Authentication
All API requests require a valid Bearer token passed in the Authorization header.
API keys are managed from your account at /apiKeys.
The endpoints /api/docs and /api/spec are publicly accessible and do not require authentication.
Header format: Authorization: Bearer YOUR_API_KEY
Keep your API key secret. Do not include it in client-side code or public repositories. Keys can be revoked and regenerated at any time from the API Keys page.
Base URL
All endpoints are relative to the following base URL:
https://pagerankcafe.com
All requests and responses use JSON. Include the header Content-Type: application/json
on POST requests.
Access Levels
API access is gated by your membership level. Free members can use all read endpoints. Write endpoints require a paid membership.
| Level | Read Endpoints | Write Endpoints |
|---|---|---|
| Free member | Yes | No |
| Paid member | Yes | Yes |
Error Responses
Every error returns a JSON object with a single error key describing what went wrong,
together with the matching HTTP status code. This includes an unknown /api/ path,
a malformed JSON body and unexpected server errors, so check the status code first.
Errors the API raises on purpose carry their own message; any other error carries the
standard status text, such as "Not Found" or "Internal Server Error".
Response values carry their JSON types: ids, counts and days are numbers, ctr is a decimal
number, a link post's icon is its icon number (0 for none), bold is true/false, and dates are strings.
{"error": "description of the error"}
| HTTP Status | Meaning |
|---|---|
400 |
Validation error — a required field is missing or invalid. |
401 |
Unauthorized — missing or invalid API key. |
403 |
Forbidden — paid membership required for this endpoint. |
404 |
Not found — the record does not exist or is not yours, or the /api/ path is unknown. |
405 |
Method not allowed — wrong HTTP method used for this endpoint. |
500 |
Internal server error — something went wrong on our side; try again later. |
General
Returns the current API status along with basic information about the authenticated user, including their username and membership level.
curl -X GET https://pagerankcafe.com/api/health \
-H "Authorization: Bearer YOUR_API_KEY"
import requests url = "https://pagerankcafe.com/api/health" headers = {"Authorization": "Bearer YOUR_API_KEY"} response = requests.get(url, headers=headers) print(response.json())
$ch = curl_init("https://pagerankcafe.com/api/health"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer YOUR_API_KEY" ]); $response = curl_exec($ch); curl_close($ch); $data = json_decode($response, true);
const response = await fetch("https://pagerankcafe.com/api/health", { headers: { "Authorization": "Bearer YOUR_API_KEY" } }); const data = await response.json(); console.log(data);
{
"status": "ok",
"user": "johndoe",
"membership": "upgraded"
}
Read Endpoints
Returns all active link advertisements belonging to the authenticated user. Each link includes its current view count and the number of active post slots.
curl -X GET https://pagerankcafe.com/api/links \
-H "Authorization: Bearer YOUR_API_KEY"
import requests response = requests.get( "https://pagerankcafe.com/api/links", headers={"Authorization": "Bearer YOUR_API_KEY"} ) data = response.json() for link in data["links"]: print(link["title"], link["views"])
$ch = curl_init("https://pagerankcafe.com/api/links"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer YOUR_API_KEY" ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const response = await fetch("https://pagerankcafe.com/api/links", { headers: { "Authorization": "Bearer YOUR_API_KEY" } }); const { links } = await response.json();
{
"links": [
{
"id": 1,
"title": "My Link",
"url": "https://example.com",
"views": 42,
"link_post_count": 3
}
]
}
Returns all active banner advertisements belonging to the authenticated user, including impression counts, click counts, and computed click-through rate.
curl -X GET https://pagerankcafe.com/api/banners \
-H "Authorization: Bearer YOUR_API_KEY"
response = requests.get(
"https://pagerankcafe.com/api/banners",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()
$ch = curl_init("https://pagerankcafe.com/api/banners"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer YOUR_API_KEY" ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const response = await fetch("https://pagerankcafe.com/api/banners", { headers: { "Authorization": "Bearer YOUR_API_KEY" } }); const { banners } = await response.json();
{
"banners": [
{
"id": 1,
"title": "My Banner",
"url": "https://example.com/banner.png",
"url_target": "https://example.com",
"impressions": 100,
"clicks": 5,
"ctr": 5.0
}
]
}
Returns all active YouTube video advertisements belonging to the authenticated user, along with view counts and the number of active post slots.
curl -X GET https://pagerankcafe.com/api/youtube-ads \
-H "Authorization: Bearer YOUR_API_KEY"
response = requests.get(
"https://pagerankcafe.com/api/youtube-ads",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()
$ch = curl_init("https://pagerankcafe.com/api/youtube-ads"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer YOUR_API_KEY" ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const response = await fetch("https://pagerankcafe.com/api/youtube-ads", { headers: { "Authorization": "Bearer YOUR_API_KEY" } }); const { youtube_ads } = await response.json();
{
"youtube_ads": [
{
"id": 1,
"title": "My Video",
"video_url": "https://youtube.com/watch?v=abc123",
"views": 50,
"youtube_ad_post_count": 2
}
]
}
Returns all active press release articles belonging to the authenticated user,
including their public slug, source URL, view counts, and number of active post slots.
Drafts (status 0) are not listed.
curl -X GET https://pagerankcafe.com/api/press-releases \
-H "Authorization: Bearer YOUR_API_KEY"
response = requests.get(
"https://pagerankcafe.com/api/press-releases",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()
$ch = curl_init("https://pagerankcafe.com/api/press-releases"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer YOUR_API_KEY" ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const response = await fetch("https://pagerankcafe.com/api/press-releases", { headers: { "Authorization": "Bearer YOUR_API_KEY" } }); const { press_releases } = await response.json();
{
"press_releases": [
{
"id": 1,
"title": "My Article",
"slug": "my-article",
"url": "https://example.com",
"views": 30,
"post_count": 1
}
]
}
Returns the authenticated user's current credit balance, available post slots, links viewed today, and remaining links to view for the day.
curl -X GET https://pagerankcafe.com/api/credits \
-H "Authorization: Bearer YOUR_API_KEY"
response = requests.get(
"https://pagerankcafe.com/api/credits",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()
print(data["credits"]["available_credits"])
$ch = curl_init("https://pagerankcafe.com/api/credits"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer YOUR_API_KEY" ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const response = await fetch("https://pagerankcafe.com/api/credits", { headers: { "Authorization": "Bearer YOUR_API_KEY" } }); const { credits } = await response.json();
{
"credits": {
"available_credits": 150,
"available_posts": 15,
"links_viewed": 0,
"links_remaining": 10
}
}
Returns referral signup counts for the authenticated user broken down by time period: today, last 7 days, last 30 days, and all-time total.
curl -X GET https://pagerankcafe.com/api/referral-stats \
-H "Authorization: Bearer YOUR_API_KEY"
response = requests.get(
"https://pagerankcafe.com/api/referral-stats",
headers={"Authorization": "Bearer YOUR_API_KEY"}
)
data = response.json()
$ch = curl_init("https://pagerankcafe.com/api/referral-stats"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, [ "Authorization: Bearer YOUR_API_KEY" ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const response = await fetch("https://pagerankcafe.com/api/referral-stats", { headers: { "Authorization": "Bearer YOUR_API_KEY" } }); const { referrals } = await response.json();
{
"referrals": {
"today": 0,
"last_7_days": 2,
"last_30_days": 5,
"all_time": 12
}
}
Write Endpoints
403 response.
Uploads an image and returns a hosted HTTPS URL you can use elsewhere in the API — for example
as the url of a banner created via /api/banners/create, or as an inline
image in a press release. Unlike the JSON write endpoints, this request uses
multipart/form-data so the file can be sent directly.
| Field | Type | Required | Description |
|---|---|---|---|
| image | file | Required | The image file. Max 2MB. Allowed formats: JPG, PNG, GIF, WEBP. |
| type | string | Required | One of banner or article. banner images must match a supported banner dimension (validated on upload). |
type=banner):
728x90, 300x250, 120x600, 160x600, 468x60, 336x280, 250x250, 851x315, 650x400,
800x82, 234x60, 125x125, 300x200, 120x240, 240x400, 150x60
curl -X POST https://pagerankcafe.com/api/images/upload \ -H "Authorization: Bearer YOUR_API_KEY" \ -F "type=banner" \ -F "image=@/path/to/banner.png"
response = requests.post(
"https://pagerankcafe.com/api/images/upload",
headers={"Authorization": "Bearer YOUR_API_KEY"},
data={"type": "banner"},
files={"image": open("/path/to/banner.png", "rb")}
)
data = response.json()
$ch = curl_init("https://pagerankcafe.com/api/images/upload"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, [ 'type' => 'banner', 'image' => new CURLFile('/path/to/banner.png') ]); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY' ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const form = new FormData(); form.append("type", "banner"); form.append("image", fileInput.files[0]); const response = await fetch("https://pagerankcafe.com/api/images/upload", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY" }, body: form }); const data = await response.json();
{
"status": "uploaded",
"type": "banner",
"url": "https://pagerankcafe-assets.s3.us-west-2.amazonaws.com/banners/123-....png"
}
Creates a new banner advertisement. The image URL must use HTTPS and resolve to an image
matching one of the supported dimensions. Creating a banner does not post it to rotation —
use /api/banners/post after creation to activate it.
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | Required | Display name for the banner. |
| url | string | Required | HTTPS URL to the banner image. Must match a supported dimension. |
| url_target | string | Required | Destination URL users are taken to when clicking the banner. |
curl -X POST https://pagerankcafe.com/api/banners/create \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "My Banner", "url": "https://example.com/banner.png", "url_target": "https://example.com" }'
response = requests.post(
"https://pagerankcafe.com/api/banners/create",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"title": "My Banner",
"url": "https://example.com/banner.png",
"url_target": "https://example.com"
}
)
data = response.json()
$payload = json_encode([ 'title' => 'My Banner', 'url' => 'https://example.com/banner.png', 'url_target' => 'https://example.com' ]); $ch = curl_init("https://pagerankcafe.com/api/banners/create"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json' ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const response = await fetch("https://pagerankcafe.com/api/banners/create", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ title: "My Banner", url: "https://example.com/banner.png", url_target: "https://example.com" }) }); const data = await response.json();
{
"status": "created",
"banner": {
"id": 1,
"title": "My Banner",
"url": "https://example.com/banner.png",
"url_target": "https://example.com",
"location": "TOP_BOTTOM"
}
}
Activates an existing banner ad by posting it into the rotation for the specified number of days. Paid members can post for 1 to 2 days at a cost of 10 credits (1 post point) per day.
| Field | Type | Required | Description |
|---|---|---|---|
| banner_id | integer | Required | ID of the banner to post. Must belong to the authenticated user. |
| days | integer | Optional | Number of days to post the banner. Default is 1. Paid members: 1-2. |
curl -X POST https://pagerankcafe.com/api/banners/post \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"banner_id": 1, "days": 2}'
response = requests.post(
"https://pagerankcafe.com/api/banners/post",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={"banner_id": 1, "days": 2}
)
data = response.json()
$payload = json_encode(['banner_id' => 1, 'days' => 2]); $ch = curl_init("https://pagerankcafe.com/api/banners/post"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json' ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const response = await fetch("https://pagerankcafe.com/api/banners/post", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ banner_id: 1, days: 2 }) }); const data = await response.json();
{
"status": "posted",
"banner_post": {
"banner_id": 1,
"days": 2,
"start_date": "2026-01-01 00:00:00",
"end_date": "2026-01-03 00:00:00"
}
}
Creates a new YouTube video ad. The video ID is extracted automatically from
youtube_link. Creating with status 1 (the default) emails your
followers about the video — followers are only notified once per video, ever.
Pass status 0 to create it silently as Disabled.
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | Required | Video ad title. |
| youtube_link | string | Required | YouTube video URL (youtube.com/watch, youtu.be, embed, or /v/ formats). |
| description | string | Optional | Description of the video. |
| status | integer | Optional | 1 = Active (default; notifies your followers), 0 = Disabled (silent). |
curl -X POST https://pagerankcafe.com/api/youtube-ads/create \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"title": "My Product Demo", "youtube_link": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}'
response = requests.post(
"https://pagerankcafe.com/api/youtube-ads/create",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={"title": "My Product Demo", "youtube_link": "https://www.youtube.com/watch?v=dQw4w9WgXcQ"}
)
data = response.json()
$payload = json_encode(['title' => 'My Product Demo', 'youtube_link' => 'https://www.youtube.com/watch?v=dQw4w9WgXcQ']); $ch = curl_init("https://pagerankcafe.com/api/youtube-ads/create"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json' ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const response = await fetch("https://pagerankcafe.com/api/youtube-ads/create", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ title: "My Product Demo", youtube_link: "https://www.youtube.com/watch?v=dQw4w9WgXcQ" }) }); const data = await response.json();
{
"status": "created",
"youtube_ad": {
"id": 42,
"title": "My Product Demo",
"youtube_video_id": "dQw4w9WgXcQ"
}
}
Updates an existing YouTube video ad. Only the fields you send are changed — omit a
field to leave its current value alone. You can only update ads you own; any other
youtube_ad_id returns 404. Sending a new youtube_link
re-derives the stored video ID from it.
| Field | Type | Required | Description |
|---|---|---|---|
| youtube_ad_id | integer | Required | ID of the video ad to update. Must belong to you. |
| title | string | Optional | Ad title. |
| description | string | Optional | Ad description. |
| youtube_link | string | Optional | YouTube video URL. The stored video ID is re-derived from it. |
| status | integer | Optional | 1 = Active, 0 = Disabled. Setting an ad Active emails your followers — this happens only once per ad, ever. |
curl -X PATCH https://pagerankcafe.com/api/youtube-ads/update \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"youtube_ad_id": 42, "status": 1}'
response = requests.patch(
"https://pagerankcafe.com/api/youtube-ads/update",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={"youtube_ad_id": 42, "status": 1}
)
data = response.json()
$payload = json_encode([ 'youtube_ad_id' => 42, 'status' => 1 ]); $ch = curl_init("https://pagerankcafe.com/api/youtube-ads/update"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json' ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const response = await fetch("https://pagerankcafe.com/api/youtube-ads/update", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ youtube_ad_id: 42, status: 1 }) }); const data = await response.json();
{
"status": "updated",
"youtube_ad": {
"id": 42,
"title": "My Product Demo",
"youtube_video_id": "dQw4w9WgXcQ"
}
}
Creates a new press release article. The slug must be unique across the platform
and forms the public URL /pressRelease/blog/<slug>.
The body field accepts HTML. status is required and has no default:
1= Active: the article is live at once and listed (your profile, yourGET /api/press-releases), and your followers are emailed about it. Followers are only emailed once per article, ever.0= Draft (Disabled): nobody is emailed and the article is listed nowhere (not on your profile, the blog pages, the home page widgets orGET /api/press-releases). Anyone with its exact URL/pressRelease/blog/<slug>can still view it; the page tells search engines not to index it. To publish the draft, sendPATCH /api/press-releases/updatewith justpress_release_idand"status": 1; that is when your followers are emailed.
A missing status, or any value other than the JSON integer 0 or
1, is refused with 400 {"error": "status is required and must be 0 (Draft) or 1 (Active)"}
and nothing is saved. Creating an article does not place it in the home page press release
widget; that is /api/press-releases/post.
| Field | Type | Required | Description |
|---|---|---|---|
| title | string | Required | Article headline. |
| url | string | Required | HTTPS source URL for the article. |
| intro | string | Required | Short introductory summary displayed in article listings. |
| body | string (HTML) | Required | Full article body. Accepts HTML markup. |
| slug | string | Required | URL-safe identifier, must be unique. Example: my-article-title. |
| status | integer | Required | 1 = Active (live, listed, emails your followers), 0 = Draft (unlisted, viewable only by its URL, emails nobody). No default. |
| meta_description | string | Optional | SEO meta description for the article page. |
curl -X POST https://pagerankcafe.com/api/press-releases/create \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "title": "My Article", "url": "https://example.com/source", "intro": "A short summary of the article.", "body": "<p>Full article content here.</p>", "slug": "my-article", "meta_description": "SEO description for this article.", "status": 0 }'
response = requests.post(
"https://pagerankcafe.com/api/press-releases/create",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={
"title": "My Article",
"url": "https://example.com/source",
"intro": "A short summary of the article.",
"body": "<p>Full article content here.</p>",
"slug": "my-article",
"meta_description": "SEO description for this article.",
"status": 0
}
)
data = response.json()
$payload = json_encode([ 'title' => 'My Article', 'url' => 'https://example.com/source', 'intro' => 'A short summary of the article.', 'body' => '<p>Full article content here.</p>', 'slug' => 'my-article', 'meta_description' => 'SEO description for this article.', 'status' => 0 ]); $ch = curl_init("https://pagerankcafe.com/api/press-releases/create"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json' ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const response = await fetch("https://pagerankcafe.com/api/press-releases/create", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ title: "My Article", url: "https://example.com/source", intro: "A short summary of the article.", body: "<p>Full article content here.</p>", slug: "my-article", meta_description: "SEO description for this article.", status: 0 }) }); const data = await response.json();
{
"status": "created",
"press_release": {
"id": 1,
"title": "My Article",
"slug": "my-article"
}
}
Updates an existing press release. Only the fields you send are changed — omit a field
to leave its current value alone. You can only update articles you own; any other
press_release_id returns 404. Changing the slug changes the
public URL at /pressRelease/blog/<slug>, so existing links to the old
slug will stop working.
Publishing a draft: send only press_release_id and
"status": 1. The article goes live and is listed, and your followers are emailed
(the first time it becomes Active; never again after that). "status": 0 turns an
article back into an unlisted draft. Any other status value is refused with 400.
| Field | Type | Required | Description |
|---|---|---|---|
| press_release_id | integer | Required | ID of the article to update. Must belong to you. |
| title | string | Optional | Article headline. |
| url | string | Optional | HTTPS source URL for the article. |
| intro | string | Optional | Short introductory summary displayed in article listings. |
| body | string (HTML) | Optional | Full article body. Accepts HTML markup. |
| slug | string | Optional | URL-safe identifier, must be unique across the platform. |
| meta_description | string | Optional | SEO meta description for the article page. |
| status | integer | Optional | 1 = Active, 0 = Draft (Disabled: unlisted, viewable only by its URL). Setting an article Active emails your followers — this happens only once per article, ever. |
curl -X PATCH https://pagerankcafe.com/api/press-releases/update \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"press_release_id": 1, "status": 1}'
response = requests.patch(
"https://pagerankcafe.com/api/press-releases/update",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={"press_release_id": 1, "status": 1}
)
data = response.json()
$payload = json_encode([ 'press_release_id' => 1, 'status' => 1 ]); $ch = curl_init("https://pagerankcafe.com/api/press-releases/update"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json' ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const response = await fetch("https://pagerankcafe.com/api/press-releases/update", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ press_release_id: 1, status: 1 }) }); const data = await response.json();
{
"status": "updated",
"press_release": {
"id": 1,
"title": "My Article",
"slug": "my-article"
}
}
Places one of your press releases in the home page press release widget for a number of days, paid with credits: paid members post for 7 days at a cost of 70 credits (7 post points); admins post for 7, 30, 180 or 365 days at no cost. The placement starts at once.
Only an Active article can be posted. A draft (status 0) is refused with 400
{"error": "press release is a draft; publish it (PATCH status 1) before posting"},
and nothing is charged, placed or queued. Publish the draft first
(PATCH /api/press-releases/update with "status": 1), then post it.
Posting also queues the follower email for the article; it is sent only once per article, ever.
| Field | Type | Required | Description |
|---|---|---|---|
| press_release_id | integer | Required | ID of the press release to post. Must belong to the authenticated user. |
| days | integer | Optional |
Duration in days. Default is 7.
|
curl -X POST https://pagerankcafe.com/api/press-releases/post \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"press_release_id": 1, "days": 7}'
response = requests.post(
"https://pagerankcafe.com/api/press-releases/post",
headers={
"Authorization": "Bearer YOUR_API_KEY",
"Content-Type": "application/json"
},
json={"press_release_id": 1, "days": 7}
)
data = response.json()
$payload = json_encode([ 'press_release_id' => 1, 'days' => 7 ]); $ch = curl_init("https://pagerankcafe.com/api/press-releases/post"); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $payload); curl_setopt($ch, CURLOPT_HTTPHEADER, [ 'Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json' ]); $data = json_decode(curl_exec($ch), true); curl_close($ch);
const response = await fetch("https://pagerankcafe.com/api/press-releases/post", { method: "POST", headers: { "Authorization": "Bearer YOUR_API_KEY", "Content-Type": "application/json" }, body: JSON.stringify({ press_release_id: 1, days: 7 }) }); const data = await response.json();
{
"status": "posted",
"press_release_post": {
"press_release_id": 1,
"days": 7,
"start_date": "2026-01-01 00:00:00",
"end_date": "2026-01-08 00:00:00"
}
}
