Posts

Return posts from all boards accessible to owner of API token.

/api/v1/posts/

Get

You need to provide Authorization header with Bearer token or query string param:

curl -H 'Accept: application/json'\
     -H "Authorization: Bearer <API_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>
        },
        ...
    ]
}

Search

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 post

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

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.

Example response

{"status": "Success", "post_id": <ID>, "url": "<FULL URL>"}