curl --request POST \
--url https://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"companyId": "<string>",
"contentType": "blog_post",
"brandVoiceId": "<string>",
"generateImages": true,
"brandImageId": "<string>",
"publishDate": "2023-11-07T05:31:56Z",
"icpId": "<string>"
}
'import requests
url = "https://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate"
payload = {
"companyId": "<string>",
"contentType": "blog_post",
"brandVoiceId": "<string>",
"generateImages": True,
"brandImageId": "<string>",
"publishDate": "2023-11-07T05:31:56Z",
"icpId": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
companyId: '<string>',
contentType: 'blog_post',
brandVoiceId: '<string>',
generateImages: true,
brandImageId: '<string>',
publishDate: '2023-11-07T05:31:56Z',
icpId: '<string>'
})
};
fetch('https://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate', 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://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate",
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([
'companyId' => '<string>',
'contentType' => 'blog_post',
'brandVoiceId' => '<string>',
'generateImages' => true,
'brandImageId' => '<string>',
'publishDate' => '2023-11-07T05:31:56Z',
'icpId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate"
payload := strings.NewReader("{\n \"companyId\": \"<string>\",\n \"contentType\": \"blog_post\",\n \"brandVoiceId\": \"<string>\",\n \"generateImages\": true,\n \"brandImageId\": \"<string>\",\n \"publishDate\": \"2023-11-07T05:31:56Z\",\n \"icpId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyId\": \"<string>\",\n \"contentType\": \"blog_post\",\n \"brandVoiceId\": \"<string>\",\n \"generateImages\": true,\n \"brandImageId\": \"<string>\",\n \"publishDate\": \"2023-11-07T05:31:56Z\",\n \"icpId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyId\": \"<string>\",\n \"contentType\": \"blog_post\",\n \"brandVoiceId\": \"<string>\",\n \"generateImages\": true,\n \"brandImageId\": \"<string>\",\n \"publishDate\": \"2023-11-07T05:31:56Z\",\n \"icpId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Generate a content piece from an opportunity's brief.
Creates a record in the Content Engine and writes the piece in the background using the opportunity’s title, outline, target keywords and AEO recommendations. Defaults to the parent project’s ICP unless icpId is supplied. Returns immediately; the opportunity moves to “generated”.
curl --request POST \
--url https://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"companyId": "<string>",
"contentType": "blog_post",
"brandVoiceId": "<string>",
"generateImages": true,
"brandImageId": "<string>",
"publishDate": "2023-11-07T05:31:56Z",
"icpId": "<string>"
}
'import requests
url = "https://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate"
payload = {
"companyId": "<string>",
"contentType": "blog_post",
"brandVoiceId": "<string>",
"generateImages": True,
"brandImageId": "<string>",
"publishDate": "2023-11-07T05:31:56Z",
"icpId": "<string>"
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
companyId: '<string>',
contentType: 'blog_post',
brandVoiceId: '<string>',
generateImages: true,
brandImageId: '<string>',
publishDate: '2023-11-07T05:31:56Z',
icpId: '<string>'
})
};
fetch('https://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate', 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://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate",
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([
'companyId' => '<string>',
'contentType' => 'blog_post',
'brandVoiceId' => '<string>',
'generateImages' => true,
'brandImageId' => '<string>',
'publishDate' => '2023-11-07T05:31:56Z',
'icpId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate"
payload := strings.NewReader("{\n \"companyId\": \"<string>\",\n \"contentType\": \"blog_post\",\n \"brandVoiceId\": \"<string>\",\n \"generateImages\": true,\n \"brandImageId\": \"<string>\",\n \"publishDate\": \"2023-11-07T05:31:56Z\",\n \"icpId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"companyId\": \"<string>\",\n \"contentType\": \"blog_post\",\n \"brandVoiceId\": \"<string>\",\n \"generateImages\": true,\n \"brandImageId\": \"<string>\",\n \"publishDate\": \"2023-11-07T05:31:56Z\",\n \"icpId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.parallellabs.app/api/v0/research/opportunities/{opportunityId}/generate")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"companyId\": \"<string>\",\n \"contentType\": \"blog_post\",\n \"brandVoiceId\": \"<string>\",\n \"generateImages\": true,\n \"brandImageId\": \"<string>\",\n \"publishDate\": \"2023-11-07T05:31:56Z\",\n \"icpId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Company API key - scoped to a specific company. Generate from the Integrations page in your dashboard.
Path Parameters
Body
Generation options
Options for generating a content piece from an opportunity's brief
Company ID that owns the opportunity
Content type to generate, e.g. "blog_post" or "linkedin_post". Defaults to "blog_post".
Brand voice to write in
Generate images with the content; disable for text only
Brand image set for visuals
Scheduled publish date for the generated piece
Override the funnel stage. One of: tofu, mofu, bofu. Defaults to the opportunity's own stage.
tofu, mofu, bofu ICP to write for. Defaults to the parent project's ICP.

