MENU navbar-image

Introduction

You can use our ProductLift's API to smoothly integrate ProductLift with other services.

This documentation aims to provide all the information you need to work with our API.

Base URL

{YOUR-PORTAL-URL}

Authenticating requests

Authenticate requests to this API's endpoints by sending an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your portal and go to Customize > API & Webhooks.

Categories

Categories (e.g. Bug, Integration) can be used to organize and group posts. Categories are visible for your users. Posts can have multiple categories.

List categories

requires authentication

Lists all categories of your portal.

Example request:
curl --request GET \
    --get "{YOUR-PORTAL-URL}/api/v1/categories" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/categories"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    '{YOUR-PORTAL-URL}/api/v1/categories',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/categories'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Bug",
            "color": "#ABDEE6"
        },
        {
            "id": 1,
            "name": "Bug",
            "color": "#ABDEE6"
        }
    ]
}
 

Request   

GET api/v1/categories

Create category

requires authentication

Creates a new category in your portal.

Example request:
curl --request POST \
    "{YOUR-PORTAL-URL}/api/v1/categories" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/categories"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    '{YOUR-PORTAL-URL}/api/v1/categories',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/categories'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Example response (200):


{
    "data": {
        "id": 1,
        "name": "Bug",
        "color": "#ABDEE6"
    }
}
 

Example response (422):


{
 "message": "The given data was invalid.",
 "errors": {
 "name": [
     "The name has already been taken."
 ]
}
 

Request   

POST api/v1/categories

Body Parameters

name  string optional  

Delete category

requires authentication

Deletes a specified category.

Example request:
curl --request DELETE \
    "{YOUR-PORTAL-URL}/api/v1/categories/15" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/categories/15"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    '{YOUR-PORTAL-URL}/api/v1/categories/15',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/categories/15'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (200):


{}
 

Example response (404):


{
    "message": "No query results for model [App\\Category] ..."
}
 

Request   

DELETE api/v1/categories/{id}

URL Parameters

id  integer  

The ID of the category.

Update category

requires authentication

Updates the details of a category.

Example request:
curl --request PATCH \
    "{YOUR-PORTAL-URL}/api/v1/categories/8" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"color\": \"#acyquV$\\/m\"
}"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/categories/8"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "color": "#acyquV$\/m"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
    '{YOUR-PORTAL-URL}/api/v1/categories/8',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'color' => '#acyquV$/m',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/categories/8'
payload = {
    "color": "#acyquV$\/m"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()

Example response (200):


{
    "data": {
        "id": 1,
        "name": "Bug",
        "color": "#ABDEE6"
    }
}
 

Example response (404):


{
    "message": "No query results for model [App\\Category] ..."
}
 

Example response (422):


{
 "message": "The given data was invalid.",
 "errors": {
 "name": [
     "The name has already been taken."
 ]
}
 

Request   

PATCH api/v1/categories/{id}

URL Parameters

id  integer  

The ID of the category.

Body Parameters

name  string optional  

color  string  

Hex color code for the category. The value format is invalid.

Other endpoints

GET api/v1/tabs/{key}

requires authentication

Example request:
curl --request GET \
    --get "{YOUR-PORTAL-URL}/api/v1/tabs/0" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/tabs/0"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    '{YOUR-PORTAL-URL}/api/v1/tabs/0',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/tabs/0'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Service Unavailable"
}
 

Request   

GET api/v1/tabs/{key}

URL Parameters

key  integer  

GET api/v1/tabs/{key}/fetch

requires authentication

Example request:
curl --request GET \
    --get "{YOUR-PORTAL-URL}/api/v1/tabs/0/fetch" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/tabs/0/fetch"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    '{YOUR-PORTAL-URL}/api/v1/tabs/0/fetch',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/tabs/0/fetch'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Service Unavailable"
}
 

Request   

GET api/v1/tabs/{key}/fetch

URL Parameters

key  integer  

Portal

You should see a portal as a single project for your product or service. It can consist of roadmaps, changelogs, voting boards, etc.

Retrieve portal

requires authentication

Retrieves the details of your portal.

Example request:
curl --request GET \
    --get "{YOUR-PORTAL-URL}/api/v1/portal" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/portal"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    '{YOUR-PORTAL-URL}/api/v1/portal',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/portal'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": {
        "guid": "3e3e7803-5b6c-4121-99f2-88754ff9b59f",
        "title": "fuga in",
        "localization": "en"
    }
}
 

Request   

GET api/v1/portal

Posts

Manage posts.

Find duplicates

requires authentication

Searches the database for duplicate posts.

Example request:
curl --request GET \
    --get "{YOUR-PORTAL-URL}/api/v1/posts/search_duplicates" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"ymidqohslxmjxngeozueqcmhdnhehsgirforksnshbzmeolknyhfunwjijgtmcsgvzowypnzmxqaxpcqlneghurlroldskhhcorsgqciltkjtkfxakblwsnicooewtkwrmianbmmqdzhydwnjnonzvrvnmemqzziyqhbgldng\",
    \"description\": \"amet\"
}"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/posts/search_duplicates"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "ymidqohslxmjxngeozueqcmhdnhehsgirforksnshbzmeolknyhfunwjijgtmcsgvzowypnzmxqaxpcqlneghurlroldskhhcorsgqciltkjtkfxakblwsnicooewtkwrmianbmmqdzhydwnjnonzvrvnmemqzziyqhbgldng",
    "description": "amet"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    '{YOUR-PORTAL-URL}/api/v1/posts/search_duplicates',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'ymidqohslxmjxngeozueqcmhdnhehsgirforksnshbzmeolknyhfunwjijgtmcsgvzowypnzmxqaxpcqlneghurlroldskhhcorsgqciltkjtkfxakblwsnicooewtkwrmianbmmqdzhydwnjnonzvrvnmemqzziyqhbgldng',
            'description' => 'amet',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/posts/search_duplicates'
payload = {
    "title": "ymidqohslxmjxngeozueqcmhdnhehsgirforksnshbzmeolknyhfunwjijgtmcsgvzowypnzmxqaxpcqlneghurlroldskhhcorsgqciltkjtkfxakblwsnicooewtkwrmianbmmqdzhydwnjnonzvrvnmemqzziyqhbgldng",
    "description": "amet"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload)
response.json()

Example response (200):


{
 "count": 0,
}
 

Example response (200):


{
 "count": 1,
 "posts": {
             {
                 "id": "d8QEXH",
                 "title": "Open links in new window",
                 "description": "Option to open links in a new window."
              }
          }
}
 

Request   

GET api/v1/posts/search_duplicates

Body Parameters

title  string optional  

Optionally adjust the post title. Must be at least 2 characters. Must not be greater than 180 characters.

description  string optional  

Optionally adjust the description of the post.

List posts

requires authentication

Retrieves a complete list of posts from your portal. Includes a "hasMore" attribute indicating if additional posts exist beyond the specified query limit.

Example request:
curl --request GET \
    --get "{YOUR-PORTAL-URL}/api/v1/posts" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"limit\": 49,
    \"skip\": 14
}"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/posts"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "limit": 49,
    "skip": 14
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    '{YOUR-PORTAL-URL}/api/v1/posts',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'limit' => 49,
            'skip' => 14,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/posts'
payload = {
    "limit": 49,
    "skip": 14
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Service Unavailable"
}
 

Request   

GET api/v1/posts

Body Parameters

tab  string optional  

Optional tab url to filter on the tab, example: roadmap.

category  string optional  

Optional category ID of the posts.

section  string optional  

Optional section ID of the posts.

limit  integer optional  

A limit on the number of posts to be returned. Limit can range between 1 and 100, and the default is 10. Must be at least 1. Must not be greater than 100.

skip  integer optional  

The number of posts you'd like to skip before starting to fetch. Defaults to 0 if not specified.

Create post

requires authentication

Creates a new post in your portal.

Example request:
curl --request POST \
    "{YOUR-PORTAL-URL}/api/v1/posts" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"eekwav\",
    \"description\": \"accusantium\",
    \"category_id\": 13,
    \"status_id\": 16,
    \"section_id\": 8,
    \"user_id\": \"76746b85-4536-33fc-90e6-18c8585c8450\"
}"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/posts"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "eekwav",
    "description": "accusantium",
    "category_id": 13,
    "status_id": 16,
    "section_id": 8,
    "user_id": "76746b85-4536-33fc-90e6-18c8585c8450"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    '{YOUR-PORTAL-URL}/api/v1/posts',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'eekwav',
            'description' => 'accusantium',
            'category_id' => 13,
            'status_id' => 16,
            'section_id' => 8,
            'user_id' => '76746b85-4536-33fc-90e6-18c8585c8450',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/posts'
payload = {
    "title": "eekwav",
    "description": "accusantium",
    "category_id": 13,
    "status_id": 16,
    "section_id": 8,
    "user_id": "76746b85-4536-33fc-90e6-18c8585c8450"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (404):


{
    "message": "No query results for model [App\\User] ..."
}
 

Example response (422):


{
 "message": "The given data was invalid.",
 "errors": {
   "user_id": [
     "The user id must be a valid UUID."
   ]
}
 

Example response (200):


{
    "data": {
        "id": "WEukJy",
        "title": "Photo upload",
        "description": "It would be great if I can upload a photo.",
        "author": {
            "id": "420b8cfb-2c3d-4df2-b6bd-7ac6aae1a14a",
            "name": "Madalyn",
            "email": "robyn.oconner@example.net",
            "role": "member",
            "counter_votes": 4,
            "counter_comments": 0,
            "counter_posts": 0,
            "counter_comment_votes": 0
        },
        "categories": [
            {
                "id": 3,
                "name": "Integration",
                "color": "#FFAEA5"
            }
        ],
        "status": {
            "id": 3,
            "name": "💪 Now available",
            "color": "#FFCCB6",
            "tab_name": "Updates"
        }
    }
}
 

Request   

POST api/v1/posts

Body Parameters

title  string  

Post title. Must be at least 2 characters. Must not be greater than 180 characters.

description  string optional  

Description of the post.

category_id  integer optional  

Optional category ID of the post. If not given or not found, no category will be added.

status_id  integer optional  

Optional status ID of the post. If not given or not found, the default status will be selected.

section_id  integer optional  

Optional section ID of the post. If not given or not found, it will be null.

user_id  string optional  

Optional user ID. If not given or not found, the post will be created from the logged in user or anonymous. Must be a valid UUID.

Retrieve post

requires authentication

Retrieves the details of a specified post.

Example request:
curl --request GET \
    --get "{YOUR-PORTAL-URL}/api/v1/posts/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/posts/5"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    '{YOUR-PORTAL-URL}/api/v1/posts/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/posts/5'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (404):


{
    "message": "No query results for model [App\\Post] ..."
}
 

Example response (200):


{
    "data": {
        "id": "WEukJy",
        "title": "Photo upload",
        "description": "It would be great if I can upload a photo.",
        "author": {
            "id": "420b8cfb-2c3d-4df2-b6bd-7ac6aae1a14a",
            "name": "Madalyn",
            "email": "robyn.oconner@example.net",
            "role": "member",
            "counter_votes": 4,
            "counter_comments": 0,
            "counter_posts": 0,
            "counter_comment_votes": 0
        },
        "categories": [
            {
                "id": 3,
                "name": "Integration",
                "color": "#FFAEA5"
            }
        ],
        "status": {
            "id": 3,
            "name": "💪 Now available",
            "color": "#FFCCB6",
            "tab_name": "Updates"
        }
    }
}
 

Request   

GET api/v1/posts/{post}

URL Parameters

post  integer  

id  string  

The ID of the post.

Update post

requires authentication

Updates the specified post by setting the values of the parameters passed. Any parameters not provided will be left unchanged.

Example request:
curl --request PATCH \
    "{YOUR-PORTAL-URL}/api/v1/posts/5" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"title\": \"onppfgqzmoenus\",
    \"description\": \"optio\",
    \"user_id\": \"05c2798e-5f82-3f3c-8134-356fc5790e64\"
}"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/posts/5"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "title": "onppfgqzmoenus",
    "description": "optio",
    "user_id": "05c2798e-5f82-3f3c-8134-356fc5790e64"
};

fetch(url, {
    method: "PATCH",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->patch(
    '{YOUR-PORTAL-URL}/api/v1/posts/5',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'title' => 'onppfgqzmoenus',
            'description' => 'optio',
            'user_id' => '05c2798e-5f82-3f3c-8134-356fc5790e64',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/posts/5'
payload = {
    "title": "onppfgqzmoenus",
    "description": "optio",
    "user_id": "05c2798e-5f82-3f3c-8134-356fc5790e64"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PATCH', url, headers=headers, json=payload)
response.json()

Example response (404):


{
    "message": "No query results for model [App\\Post] ..."
}
 

Example response (404):


{
    "message": "No query results for model [App\\User] ..."
}
 

Example response (422):


{
 "message": "The given data was invalid.",
 "errors": {
   "user_id": [
     "The user id must be a valid UUID."
   ]
}
 

Example response (200):


{
    "data": {
        "id": "WEukJy",
        "title": "Photo upload",
        "description": "It would be great if I can upload a photo.",
        "author": {
            "id": "420b8cfb-2c3d-4df2-b6bd-7ac6aae1a14a",
            "name": "Madalyn",
            "email": "robyn.oconner@example.net",
            "role": "member",
            "counter_votes": 4,
            "counter_comments": 0,
            "counter_posts": 0,
            "counter_comment_votes": 0
        },
        "categories": [
            {
                "id": 3,
                "name": "Integration",
                "color": "#FFAEA5"
            }
        ],
        "status": {
            "id": 3,
            "name": "💪 Now available",
            "color": "#FFCCB6",
            "tab_name": "Updates"
        }
    }
}
 

Request   

PATCH api/v1/posts/{post}

URL Parameters

post  integer  

id  string  

The ID of the post.

Body Parameters

title  string optional  

Optionally adjust the post title. Must be at least 2 characters. Must not be greater than 180 characters.

description  string optional  

Optionally adjust the description of the post.

user_id  string optional  

Optionally adjust user ID. If NULL is given, the post will become anonymous. Must be a valid UUID.

Delete post

requires authentication

Deletes a specified post.

Example request:
curl --request DELETE \
    "{YOUR-PORTAL-URL}/api/v1/posts/9" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/posts/9"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    '{YOUR-PORTAL-URL}/api/v1/posts/9',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/posts/9'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (200):


{}
 

Example response (404):


{
    "message": "No query results for model [App\\Post] ..."
}
 

Request   

DELETE api/v1/posts/{post}

URL Parameters

post  integer  

id  string  

The ID of the post.

Statuses

Posts are connected to a status (e.g. Planned, Done). ProductLift allows you to create any status.

List statuses

requires authentication

Lists all statuses in your portal.

Example request:
curl --request GET \
    --get "{YOUR-PORTAL-URL}/api/v1/statuses" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/statuses"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    '{YOUR-PORTAL-URL}/api/v1/statuses',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/statuses'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 1,
            "name": "Gathering votes",
            "color": "#DCD9F8",
            "tab_name": "Wish list"
        },
        {
            "id": 1,
            "name": "Gathering votes",
            "color": "#DCD9F8",
            "tab_name": "Wish list"
        }
    ]
}
 

Request   

GET api/v1/statuses

Users

Users can create posts, votes, and comments. You can create and manage users from the API.

Find by email

requires authentication

Retrieves the details of a specified user by email.

Example request:
curl --request GET \
    --get "{YOUR-PORTAL-URL}/api/v1/users/find_by_email" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"qnwfmpfjsggkzjzxg\"
}"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/users/find_by_email"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "qnwfmpfjsggkzjzxg"
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    '{YOUR-PORTAL-URL}/api/v1/users/find_by_email',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => 'qnwfmpfjsggkzjzxg',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/users/find_by_email'
payload = {
    "email": "qnwfmpfjsggkzjzxg"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload)
response.json()

Example response (404):


{
    "message": "User not found"
}
 

Example response (422):


{
 "message": "The given data was invalid.",
 "errors": {
 "role": [
     "The email must be a valid email address."
 ]
}
 

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Service Unavailable"
}
 

Request   

GET api/v1/users/find_by_email

Body Parameters

email  string  

The user's email. Must be a valid email address. Must not be greater than 191 characters.

List users

requires authentication

Lists all users of your portal.

Example request:
curl --request GET \
    --get "{YOUR-PORTAL-URL}/api/v1/users" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"limit\": 89,
    \"skip\": 17
}"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/users"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "limit": 89,
    "skip": 17
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    '{YOUR-PORTAL-URL}/api/v1/users',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'limit' => 89,
            'skip' => 17,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/users'
payload = {
    "limit": 89,
    "skip": 17
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Service Unavailable"
}
 

Request   

GET api/v1/users

Body Parameters

limit  integer optional  

A limit on the number of posts to be returned. Limit can range between 1 and 100, and the default is 10. Must be at least 1. Must not be greater than 100.

skip  integer optional  

The number of users you'd like to skip before starting to fetch. Defaults to 0 if not specified.

Create user

requires authentication

Creates a new user in your portal. You can either provide a password, or you can invite the user.

Example request:
curl --request POST \
    "{YOUR-PORTAL-URL}/api/v1/users" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"neykrgystrehbdcnzriszxjzsdxaodsrrerczzhmmsyxpzemqwbkzzmemulvmpwospnhwqxfdblqgsjphsdrefzeqcqilkrbm\",
    \"role\": \"admin\",
    \"name\": \"arxjhpbcmvnyhdbotpziafgogvatlkzjkpwnhdgcfsii\",
    \"invitation_message\": \"xsczsuvrwgcumsknutzddtjxhkfjazvtjfsfmkvcnrystywwyaksgearxzraaqwhxpuehvjemmxzbqvzhknxoxlmjlff\",
    \"password\": \"eqg\"
}"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/users"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "neykrgystrehbdcnzriszxjzsdxaodsrrerczzhmmsyxpzemqwbkzzmemulvmpwospnhwqxfdblqgsjphsdrefzeqcqilkrbm",
    "role": "admin",
    "name": "arxjhpbcmvnyhdbotpziafgogvatlkzjkpwnhdgcfsii",
    "invitation_message": "xsczsuvrwgcumsknutzddtjxhkfjazvtjfsfmkvcnrystywwyaksgearxzraaqwhxpuehvjemmxzbqvzhknxoxlmjlff",
    "password": "eqg"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    '{YOUR-PORTAL-URL}/api/v1/users',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => 'neykrgystrehbdcnzriszxjzsdxaodsrrerczzhmmsyxpzemqwbkzzmemulvmpwospnhwqxfdblqgsjphsdrefzeqcqilkrbm',
            'role' => 'admin',
            'name' => 'arxjhpbcmvnyhdbotpziafgogvatlkzjkpwnhdgcfsii',
            'invitation_message' => 'xsczsuvrwgcumsknutzddtjxhkfjazvtjfsfmkvcnrystywwyaksgearxzraaqwhxpuehvjemmxzbqvzhknxoxlmjlff',
            'password' => 'eqg',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/users'
payload = {
    "email": "neykrgystrehbdcnzriszxjzsdxaodsrrerczzhmmsyxpzemqwbkzzmemulvmpwospnhwqxfdblqgsjphsdrefzeqcqilkrbm",
    "role": "admin",
    "name": "arxjhpbcmvnyhdbotpziafgogvatlkzjkpwnhdgcfsii",
    "invitation_message": "xsczsuvrwgcumsknutzddtjxhkfjazvtjfsfmkvcnrystywwyaksgearxzraaqwhxpuehvjemmxzbqvzhknxoxlmjlff",
    "password": "eqg"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (422):


{
    "message": "User already exists"
}
 

Example response (422):


{
 "message": "The given data was invalid.",
 "errors": {
 "role": [
     "The selected role is invalid."
 ]
}
 

Request   

POST api/v1/users

Body Parameters

email  string optional  

Must be a valid email address. Must not be greater than 191 characters.

role  string  

Must be one of admin or member.

name  string optional  

Name for the user. Omit or null to automatically determine a name based on the email. Must not be greater than 100 characters.

invitation_message  string optional  

You can provide a custom invitation message. Omit or null to use the default message. Must not be greater than 1000 characters.

skip_email  string optional  

Provide a value to skip sending an email. Omit or null to send invitation email.

password  string optional  

Provide a password to skip sending an invitation. Omit or null to use an invitation (for which an email can be sent or not). Must not be greater than 100 characters. Must be at least 8 characters.

Retrieve user

requires authentication

Retrieves the details of a specified user.

Example request:
curl --request GET \
    --get "{YOUR-PORTAL-URL}/api/v1/users/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/users/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    '{YOUR-PORTAL-URL}/api/v1/users/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/users/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (404):


{
    "message": "No query results for model [App\\User] ..."
}
 

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Service Unavailable"
}
 

Request   

GET api/v1/users/{id}

URL Parameters

id  string  

The ID of the user.

Update user

requires authentication

Updates the details of a specified user.

Example request:
curl --request PUT \
    "{YOUR-PORTAL-URL}/api/v1/users/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"email\": \"stokes.milo@example.org\",
    \"role\": \"admin\",
    \"name\": \"srcqimgsavvqgyiiyrneveadjvbqoyndp\",
    \"password\": \"ccj\"
}"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/users/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "email": "stokes.milo@example.org",
    "role": "admin",
    "name": "srcqimgsavvqgyiiyrneveadjvbqoyndp",
    "password": "ccj"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
    '{YOUR-PORTAL-URL}/api/v1/users/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'email' => 'stokes.milo@example.org',
            'role' => 'admin',
            'name' => 'srcqimgsavvqgyiiyrneveadjvbqoyndp',
            'password' => 'ccj',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/users/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88'
payload = {
    "email": "stokes.milo@example.org",
    "role": "admin",
    "name": "srcqimgsavvqgyiiyrneveadjvbqoyndp",
    "password": "ccj"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (404):


{
    "message": "No query results for model [App\\User] ..."
}
 

Example response (422):


{
 "message": "The given data was invalid.",
 "errors": {
 "role": [
     "The selected role is invalid."
 ]
}
 

Request   

PUT api/v1/users/{id}

PATCH api/v1/users/{id}

URL Parameters

id  string  

The ID of the user.

Body Parameters

email  string optional  

Make null or omit to keep current value. Must be unique in the portal. Must be a valid email address.

role  string optional  

Make null or omit to keep current value. Must be one of admin or member.

name  string optional  

Make null or omit to keep current value. Must not be greater than 100 characters.

password  string optional  

Make null or omit to keep current value. Must not be greater than 100 characters. Must be at least 8 characters.

Delete user

requires authentication

Deletes a specified user.

Example request:
curl --request DELETE \
    "{YOUR-PORTAL-URL}/api/v1/users/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"delete_all_data\": true
}"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/users/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "delete_all_data": true
};

fetch(url, {
    method: "DELETE",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    '{YOUR-PORTAL-URL}/api/v1/users/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'delete_all_data' => true,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/users/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88'
payload = {
    "delete_all_data": true
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers, json=payload)
response.json()

Example response (200):


{}
 

Example response (404):


{
    "message": "No query results for model [App\\User] ..."
}
 

Request   

DELETE api/v1/users/{id}

URL Parameters

id  string  

The ID of the user.

Body Parameters

delete_all_data  boolean optional  

Set true or 1 to delete all data from this user. Otherwise, posts, comments, will remain with [User Deleted] as the username.

Votes

Manage votes on your posts.

List votes

requires authentication

Lists all votes of a post.

Example request:
curl --request GET \
    --get "{YOUR-PORTAL-URL}/api/v1/posts/0UFQQh/votes" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/posts/0UFQQh/votes"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
    '{YOUR-PORTAL-URL}/api/v1/posts/0UFQQh/votes',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/posts/0UFQQh/votes'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (503):

Show headers
cache-control: no-cache, private
content-type: application/json
access-control-allow-origin: *
 

{
    "message": "Service Unavailable"
}
 

Request   

GET api/v1/posts/{key}/votes

URL Parameters

key  string  

The ID of the post.

Revoke vote

requires authentication

Revoke users vote for a post.

Example request:
curl --request DELETE \
    "{YOUR-PORTAL-URL}/api/v1/posts/0UFQQh/votes/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/posts/0UFQQh/votes/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->delete(
    '{YOUR-PORTAL-URL}/api/v1/posts/0UFQQh/votes/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/posts/0UFQQh/votes/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (200):


{}
 

Example response (404):


{
    "message": "No query results for model [App\\User] ..."
}
 

Example response (404):


{
    "message": "No query results for model [App\\Post] ..."
}
 

Example response (422):


{
    "message": "Post is not voteable."
}
 

Example response (422):


{
    "message": "User has not voted yet."
}
 

Request   

DELETE api/v1/posts/{key}/votes/{user}

URL Parameters

key  string  

The ID of the post.

user  string  

The ID of the user.

Create vote

requires authentication

Add the vote of a user to a post.

Example request:
curl --request POST \
    "{YOUR-PORTAL-URL}/api/v1/posts/0UFQQh/votes/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "{YOUR-PORTAL-URL}/api/v1/posts/0UFQQh/votes/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "POST",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
    '{YOUR-PORTAL-URL}/api/v1/posts/0UFQQh/votes/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88',
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = '{YOUR-PORTAL-URL}/api/v1/posts/0UFQQh/votes/8cbfbfd6-ecc3-4ec3-8b31-ea76b11c1f88'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers)
response.json()

Example response (404):


{
    "message": "No query results for model [App\\User] ..."
}
 

Example response (404):


{
    "message": "No query results for model [App\\Post] ..."
}
 

Example response (422):


{
    "message": "Post is not voteable."
}
 

Example response (422):


{
    "message": "User has not voted yet."
}
 

Request   

POST api/v1/posts/{key}/votes/{user}

URL Parameters

key  string  

The ID of the post.

user  string  

The ID of the user.