This endpoint allows you to retrieve a list of posts, search for posts containing specific text, create posts on behalf of the owner of the API token or on behalf of users.
Getting the list of posts
You need to provide Authorization header with Bearer token or query string param:
curl -H 'Accept: application/json'\
-H "Authorization: Bearer <TOKEN>"\
https://productroad.com/api/v1/posts/
Example response
{
"next": null,
"previous": null,
"results": [
{
"id": <POST ID>,
"title": "<POST TITLE>",
"content": "<POST CONTENT>",
"url": "<POST RELATIVE URL>",
"creator": {
"id": <CREATOR ID>,
"email": "<CREATOR EMAIL>",
"name": "<CREATOR NAME>",
"alias": "<CREATOR ALIAS>",
"registered": "<CREATOR REGISTRATION DATETIME ISO FORMATTED>",
"is_admin": <IS COMPANY ADMIN BOOL>,
"is_team": <IS COMPANY TEAM BOOL>
},
"board": {
"id": <BOARD ID>,
"name": "<BOARD NAME>",
"url": "<BOARD RELATIVE URL>"
},
"status": {
"id": <STATUS ID>,
"name": "<STATUS NAME>",
"color": "<STATUS HEX COLOR>"
},
"votes_count": <VOTES COUNT>,
"created": "<CREATION DATETIME ISO FORMATTED>",
"comments_count": <COMMENTS COUNT>
},
...
]
}
Searching for posts
Search by post title and content is available. To search specific post add search
query string to endpoint:
https://productroad.com/api/v1/posts/?search=awesome
The system will return the 50 most relevant posts as a flat list, pagination will not be applied.
Create a post
You can create posts on your own behalf or on behalf of your users.
Creating posts on your own behalf
curl -H 'Accept: application/json' -H "Content-Type: application/json"\
-X POST \
-data '{"board": "<BOARD_URL(short part)>", "title": "<Post tile>", "content": "<Post content>"}'\
-H "Authorization: Bearer <API_TOKEN>"\
https://productroad.com/api/v1/posts/create/
Example response
{"status": "Success", "post_id": <ID>, "url": "<FULL URL>"}
Create a post on behalf of the customer
The request is identical to creating a post on your own behalf, but you need to add the email and full_name parameters, containing the email and username, respectively.
curl -H 'Accept: application/json' -H "Content-Type: application/json"\
-X POST \
-data '{"board": "<BOARD_URL(short part)>", "title": "<Post tile>", "content": "<Post content>", "email": "<CUSTOMERS EMAIL>", "full_name": "<CUSTOMERS FULL NAME>"}'\
-H "Authorization: Bearer <API_TOKEN>"\
https://productroad.com/api/v1/posts/create/
If a client with that email is already registered, the post will be created on their behalf. If the client is not found, it will be created with the name specified in full_name.
Response will be the same as in a creation post on your own behalf.