Developer API
Submit news, blogs, poems and articles to Paigam-E-Jagat from your own app or website, and track their review status.
Open the API Playground →1. Getting started
Ask us for a partner account. You'll receive two API keys:
- Live key —
pej_live_…— real submissions that enter our editorial review queue. - Sandbox key —
pej_test_…— for testing. Sandbox requests are fully validated and return realistic responses, but nothing is stored or published.
Base URL for all endpoints:
https://paigamejagat.com/api/v1
2. Authentication
Send your key on every request in the X-Api-Key header (an Authorization: Bearer <key> header also works):
X-Api-Key: pej_live_xxxxxxxxxxxxxxxxxxxxxxxx
Check your key any time:
curl https://paigamejagat.com/api/v1/ping \
-H "X-Api-Key: pej_test_xxxxxxxxxxxx"
{ "ok": true, "partner": "Acme News", "mode": "sandbox",
"allowed": { "news": true, "blogs": true, "poems": true, "articles": true } }
3. Submitting content
One endpoint per content type. All take a JSON body and the same field set (unused fields are ignored):
| Method | Endpoint | Submits |
|---|---|---|
| POST | /api/v1/news | News article |
| POST | /api/v1/blogs | Blog post |
| POST | /api/v1/poems | Poem or story |
| POST | /api/v1/articles | Article |
Request fields
| Field | Type | Notes |
|---|---|---|
title | string | Required. Headline (English). |
body | string | Required. Main text (English). Plain text or simple HTML. |
summary | string | Short description / deck (news). |
titleHindi, bodyHindi | string | Optional Hindi version. |
titlePunjabi, bodyPunjabi | string | Optional Punjabi version. |
author | string | Author / byline. |
category | string | News only — category name (matched to a news type if it exists). |
city, state, country | string | News only — dateline / place. |
imageUrl | string | Absolute URL of a cover/lead image. |
literaryType | string | Poems only — "poem" or "story". |
articleType | string | Articles only — "editor" or "other". |
externalRef | string | Your own reference id — echoed back in status so you can reconcile. |
title/body), Hindi (titleHindi/bodyHindi)
and Punjabi (titlePunjabi/bodyPunjabi). English is required; Hindi and Punjabi are optional and
stored alongside it. (Poems & stories are multilingual too, using the same fields.)
Example — submit a news article
curl -X POST https://paigamejagat.com/api/v1/news \
-H "X-Api-Key: pej_live_xxxxxxxxxxxx" \
-H "Content-Type: application/json" \
-d '{
"externalRef": "my-cms-1042",
"title": "City council approves new park",
"titleHindi": "...",
"titlePunjabi": "...",
"summary": "Green space planned for the east side.",
"body": "The council voted 7-2 on Tuesday ...",
"bodyHindi": "...",
"bodyPunjabi": "...",
"author": "Staff Reporter",
"category": "Local",
"city": "Ludhiana",
"country": "India",
"imageUrl": "https://example.com/park.jpg"
}'
JavaScript (fetch):
const res = await fetch("https://paigamejagat.com/api/v1/news", {
method: "POST",
headers: { "X-Api-Key": "pej_live_xxxx", "Content-Type": "application/json" },
body: JSON.stringify({ title: "Headline", body: "Story text ..." })
});
const data = await res.json();
console.log(data.submissionId, data.status);
C# (HttpClient):
using var http = new HttpClient();
http.DefaultRequestHeaders.Add("X-Api-Key", "pej_live_xxxx");
var body = new { title = "Headline", body = "Story text ..." };
var res = await http.PostAsJsonAsync("https://paigamejagat.com/api/v1/news", body);
var data = await res.Content.ReadAsStringAsync();
Response
{ "ok": true,
"submissionId": "sub_9f2c1a7b3d4e5f60",
"status": "pending",
"mode": "live",
"externalRef": "my-cms-1042",
"message": "Submission received and is pending editorial review." }
Save the submissionId — you use it to check status.
4. Checking status
GET /api/v1/submissions/{submissionId}
curl https://paigamejagat.com/api/v1/submissions/sub_9f2c1a7b3d4e5f60 \
-H "X-Api-Key: pej_live_xxxx"
{ "ok": true, "submissionId": "sub_9f2c1a7b3d4e5f60",
"type": "news", "status": "published", "mode": "live",
"externalRef": "my-cms-1042", "note": null,
"createdAt": "2026-10-06T10:00:00Z", "updatedAt": "2026-10-06T12:30:00Z" }
Status values
| Status | Meaning |
|---|---|
pending | Received, waiting for an editor to review it. |
published | Approved and live on the site. |
rejected | Not approved. See note for the reason, if given. |
accepted_sandbox | A sandbox submission — validated but never stored or published. |
error | The submission could not be processed. |
List your submissions
GET /api/v1/submissions — your own submissions, newest first. Query parameters (all optional):
| Param | Notes |
|---|---|
status | pending · published · rejected · accepted_sandbox · error |
from | Start date (inclusive), e.g. 2026-10-01 or an ISO timestamp. |
to | End date (inclusive). A date with no time covers the whole day. |
page, pageSize | Paging — default page 1, 20 per page (max 100). |
curl "https://paigamejagat.com/api/v1/submissions?status=published&from=2026-10-01&to=2026-10-06" -H "X-Api-Key: pej_live_xxxx"
{ "ok": true, "page": 1, "pageSize": 20, "total": 2,
"items": [
{ "submissionId": "sub_9f2c1a7b3d4e5f60", "type": "news", "status": "published",
"mode": "live", "title": "City council approves new park", "author": "Staff Reporter",
"externalRef": "my-cms-1042",
"createdAt": "2026-10-06T10:00:00Z", "updatedAt": "2026-10-06T12:30:00Z" }
] }
Scoped to your key — you only ever see your own submissions. Each item shows the author you supplied.
5. Errors
Errors return a non-2xx HTTP status and a JSON body { "error": "message" }.
| HTTP | When |
|---|---|
400 | Missing title/body or invalid request. |
401 | Missing or invalid API key. |
403 | Your key isn't allowed to submit this content type. |
404 | Unknown submission id. |
429 | Rate limit exceeded (max 60 submissions/minute per key). |
published or rejected.
6. Try it
Use the interactive playground to fire real requests with your key (use your sandbox key to avoid creating live submissions):
Open the API Playground →