API-Dokumentation
InstantPost hat eine einfache REST-API. Du kannst Beiträge automatisch erstellen, lesen und bearbeiten.
Authentifizierung
Sende deinen API-Schlüssel als HTTP-Header: X-Api-Key: DEIN_SCHLÜSSEL
Basis-URL:
https://instantpost.us
Beitrag erstellen
POST
/api/posts
Header: X-Api-Key: YOUR_KEY Content-Type: application/json
{
"title": "My title", // optional
"body": "Post content...", // required, Markdown ok
"tags": "php, tutorial", // optional, comma separated
"focus_keyword": "PHP" // optional, SEO
}
Response 201:
{
"id": "aBcDeFgHiJ",
"url": "https://instantpost.us/p/aBcDeFgHiJ",
"edit_url": "https://instantpost.us/e/YOUR_EDIT_TOKEN",
"edit_token": "YOUR_EDIT_TOKEN"
}
cURL:
curl -X POST https://instantpost.us/api/posts \
-H "X-Api-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"title":"Hello","body":"World","tags":"test"}'
Beitrag bearbeiten
PUT
/api/posts/{id}?token=EDIT_TOKEN
Or pass token as header: X-Edit-Token: EDIT_TOKEN
curl -X PUT https://instantpost.us/api/posts/aBcDeFgHiJ?token=YOUR_EDIT_TOKEN \
-H "X-Api-Key: YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"body":"Updated content"}'
Beitrag abrufen
GET
/api/posts/{id}
No authentication required.
curl https://instantpost.us/api/posts/aBcDeFgHiJ
Beiträge auflisten
GET
/api/posts?page=1&per_page=20&tag=php
No authentication required. Parameters: page, per_page (max 50), tag
curl "https://instantpost.us/api/posts?page=1&per_page=10&tag=tutorial"
API-Schlüssel anfordern
InstantPost hat eine einfache REST-API. Du kannst Beiträge automatisch erstellen, lesen und bearbeiten.
Dein API-Schlüssel (einmalig angezeigt — jetzt sichern!)
Python
import requests API_KEY = "ip_YOUR_KEY_HERE" BASE = "https://instantpost.us" r = requests.post( f"{BASE}/api/posts", headers={"X-Api-Key": API_KEY}, json={"title": "Hello from Python", "body": "It works!", "tags": "python,api"} ) print(r.json())
PHP
<?php
$data = json_encode(["title"=>"Hello","body"=>"From PHP","tags"=>"php"]);
$ctx = stream_context_create(["http"=>[
"method" => "POST",
"header" => "Content-Type: application/json\r\nX-Api-Key: ip_YOUR_KEY\r\n",
"content" => $data,
]]);
$res = file_get_contents("https://instantpost.us/api/posts", false, $ctx);
var_dump(json_decode($res, true));