curl --request POST \
--url https://productlane.com/api/v2/docs/drafts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"article_id": "<string>",
"title": "<string>",
"content": "<string>",
"allow_image_removal": true,
"group_id": "<string>",
"submit_for_review": true
}
'import requests
url = "https://productlane.com/api/v2/docs/drafts"
payload = {
"article_id": "<string>",
"title": "<string>",
"content": "<string>",
"allow_image_removal": True,
"group_id": "<string>",
"submit_for_review": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
article_id: '<string>',
title: '<string>',
content: '<string>',
allow_image_removal: true,
group_id: '<string>',
submit_for_review: true
})
};
fetch('https://productlane.com/api/v2/docs/drafts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://productlane.com/api/v2/docs/drafts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'article_id' => '<string>',
'title' => '<string>',
'content' => '<string>',
'allow_image_removal' => true,
'group_id' => '<string>',
'submit_for_review' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://productlane.com/api/v2/docs/drafts"
payload := strings.NewReader("{\n \"article_id\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"allow_image_removal\": true,\n \"group_id\": \"<string>\",\n \"submit_for_review\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://productlane.com/api/v2/docs/drafts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"article_id\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"allow_image_removal\": true,\n \"group_id\": \"<string>\",\n \"submit_for_review\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://productlane.com/api/v2/docs/drafts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"article_id\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"allow_image_removal\": true,\n \"group_id\": \"<string>\",\n \"submit_for_review\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"kind": "edit",
"status": "draft",
"article_id": "<string>",
"group_id": "<string>",
"portal_instance_id": "<string>",
"content": "<string>",
"title": "<string>",
"created_by_user_id": "<string>",
"closed_at": "<string>"
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Create docs draft
Propose an article change for review. kind: edit edits an existing article, kind: create proposes a new article, kind: delete proposes removal.
curl --request POST \
--url https://productlane.com/api/v2/docs/drafts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"article_id": "<string>",
"title": "<string>",
"content": "<string>",
"allow_image_removal": true,
"group_id": "<string>",
"submit_for_review": true
}
'import requests
url = "https://productlane.com/api/v2/docs/drafts"
payload = {
"article_id": "<string>",
"title": "<string>",
"content": "<string>",
"allow_image_removal": True,
"group_id": "<string>",
"submit_for_review": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
article_id: '<string>',
title: '<string>',
content: '<string>',
allow_image_removal: true,
group_id: '<string>',
submit_for_review: true
})
};
fetch('https://productlane.com/api/v2/docs/drafts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://productlane.com/api/v2/docs/drafts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'article_id' => '<string>',
'title' => '<string>',
'content' => '<string>',
'allow_image_removal' => true,
'group_id' => '<string>',
'submit_for_review' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://productlane.com/api/v2/docs/drafts"
payload := strings.NewReader("{\n \"article_id\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"allow_image_removal\": true,\n \"group_id\": \"<string>\",\n \"submit_for_review\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://productlane.com/api/v2/docs/drafts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"article_id\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"allow_image_removal\": true,\n \"group_id\": \"<string>\",\n \"submit_for_review\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://productlane.com/api/v2/docs/drafts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"article_id\": \"<string>\",\n \"title\": \"<string>\",\n \"content\": \"<string>\",\n \"allow_image_removal\": true,\n \"group_id\": \"<string>\",\n \"submit_for_review\": true\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"created_at": "<string>",
"updated_at": "<string>",
"kind": "edit",
"status": "draft",
"article_id": "<string>",
"group_id": "<string>",
"portal_instance_id": "<string>",
"content": "<string>",
"title": "<string>",
"created_by_user_id": "<string>",
"closed_at": "<string>"
}{
"message": "<string>",
"code": "<string>",
"issues": [
{
"message": "<string>"
}
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
edit proposes changes to an existing article (requires article_id + content). create proposes a new article (requires title + content). delete proposes removing an existing article (requires article_id).
edit, create, delete Required for kind: edit and kind: delete.
Required for kind: create. Optional for kind: edit (sets a new title; omit to keep the current one). Ignored for kind: delete.
1Markdown body of the proposed article. Required for kind: edit and kind: create. Ignored for kind: delete. On an edit it replaces the whole body, so carry over every image, table and embed the article already has. Example keys, ids and tokens are placeholders a reader cannot mistake for a real value, like <your-widget-key />; a body that adds a UUID, API key or token the article did not already show is rejected.
1kind: edit only. Defaults to false, which rejects a body that leaves out an image the article still has. Set to true to delete those images.
kind: create only. Target group for the new article. The group's portal determines which portal the article belongs to once accepted.
true (default) creates an OPEN draft visible to reviewers. false keeps it as a private DRAFT.
Response
Successful response
edit, create, delete draft, open, accepted, rejected, superseded