Anmelden
Funktionen Video-KI Preise Vergleichen Blog Jetzt loslegen
DOKUMENTATION FÜR ENTWICKLER

Referência da API

Vollständige Referenz für die InMedia REST API. Alle Endpunkte erfordern Authentifizierung über einen API-Schlüssel.

Basis-URL: https://useinmedia.com

Autenticação

Every request must include your API key as a Bearer token and your Workspace ID. You can create API keys from Dashboard → Settings → API Keys (Growth plan required).

Erforderliche Header

Authorization: Bearer sk_aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890abcd
Content-Type: application/json

Der Workspace wird automatisch aus dem API-Schlüssel bestimmt. Kein X-Workspace-Id-Header erforderlich. Der Schlüssel wird nur einmal bei der Erstellung angezeigt; sichere ihn auf.

Schnellbeispiel. Einen Beitrag erstellen

curl https://useinmedia.com/api/v1/posts \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{"title":"My post","prompt":"Bold product post for Instagram"}'
import requests

response = requests.post(
    "https://useinmedia.com/api/v1/posts",
    headers={"Authorization": "Bearer sk_..."},
    json={
        "title": "My post",
        "prompt": "Bold product post for Instagram",
    }
)
post = response.json()
const response = await fetch("https://useinmedia.com/api/v1/posts", {
  method: "POST",
  headers: {
    "Authorization": "Bearer sk_...",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    title: "My post",
    prompt: "Bold product post for Instagram",
  }),
});
const post = await response.json();
using var client = new HttpClient();
client.DefaultRequestHeaders.Add("Authorization", "Bearer sk_...");

var payload = new {
    title = "My post",
    prompt = "Bold product post for Instagram"
};
var response = await client.PostAsJsonAsync(
    "https://useinmedia.com/api/v1/posts", payload);
var post = await response.Content.ReadFromJsonAsync<JsonDocument>();
<?php
$ch = curl_init("https://useinmedia.com/api/v1/posts");
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_HTTPHEADER     => [
        "Authorization: Bearer sk_...",
        "Content-Type: application/json",
    ],
    CURLOPT_POSTFIELDS     => json_encode([
        "title"  => "My post",
        "prompt" => "Bold product post for Instagram",
    ]),
]);
$post = json_decode(curl_exec($ch), true);

Fehlercodes

CodeBedeutung
400Ungültige Anfrage. Falsche Parameter
401Unbefugt. Fehlender oder ungültiger API-Schlüssel
403Verboten. Ressource nicht in Ihrem Plan verfügbar
404Nicht gefunden. Ressource existiert nicht
429Rate-Limit überschritten. Reduziere die Frequenz

Webhook-Ereignisse

Übergeben Sie eine durch Kommas getrennte Liste von Ereignisnamen an das Ereignisfeld beim Erstellen eines Webhooks.

post.generated
Ausgelöst, wenn die KI die Erstellung eines Beitrags abgeschlossen hat
post.published
Ausgelöst, wenn ein Beitrag erfolgreich veröffentlicht wurde
post.scheduled
Ausgelöst, wenn ein Beitrag für die zukünftige Veröffentlichung geplant ist
post.failed
Ausgelöst, wenn die Erstellung oder Veröffentlichung eines Beitrags fehlschlägt
video.completed
Ausgelöst, wenn ein Video-Render-Job abgeschlossen ist
video.failed
Ausgelöst, wenn ein Video-Rendering-Job fehlschlägt

Payload-Format

Jede Webhook-Lieferung ist eine POST-Anfrage mit dem folgenden JSON-Body:

{
  "event": "post.published",
  "workspaceId": "a1b2c3d4-...",
  "timestamp": "2026-04-14T15:30:00Z",
  "data": {
    "id": "3f7a1b2c-...",
    "title": "Air Jordan launch",
    "status": "published",
    "imageUrl": "https://...",
    "publishedAt": "2026-04-14T15:30:00Z"
  }
}

Segurança do Webhook

Wenn Sie beim Erstellen eines Webhooks ein Geheimnis angeben, signiert InMedia jede Lieferung mit HMAC-SHA256. Überprüfen Sie die Signatur, um sicherzustellen, dass die Anfrage von InMedia stammt.

Signatur-Header

X-InMedia-Signature: sha256=abc123...

Der Wert ist der HMAC-SHA256 Hex-Digest des rohen Anfrage-Body unter Verwendung Ihres Webhook-Geheimnisses als Schlüssel.

Signaturprüfung

const crypto = require('crypto');

function verifySignature(payload, signature, secret) {
  const expected = 'sha256=' +
    crypto.createHmac('sha256', secret)
          .update(payload, 'utf8')
          .digest('hex');
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(expected)
  );
}
import hmac, hashlib

def verify_signature(payload: bytes, signature: str, secret: str) -> bool:
    expected = 'sha256=' + hmac.new(
        secret.encode(), payload, hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(signature, expected)
using System.Security.Cryptography;
using System.Text;

bool VerifySignature(byte[] payload, string signature, string secret)
{
    using var hmac = new HMACSHA256(Encoding.UTF8.GetBytes(secret));
    var hash     = hmac.ComputeHash(payload);
    var expected = "sha256=" + Convert.ToHexString(hash).ToLower();
    return CryptographicOperations.FixedTimeEquals(
        Encoding.UTF8.GetBytes(signature),
        Encoding.UTF8.GetBytes(expected)
    );
}
<?php
function verify_signature(
    string $payload,
    string $signature,
    string $secret
): bool {
    $expected = 'sha256=' . hash_hmac('sha256', $payload, $secret);
    return hash_equals($expected, $signature);
}

Posts

Erstellen und verwalten Sie Beiträge. Rufen Sie POST /{id}/generate auf, nachdem Sie einen Beitrag erstellt haben, um KI-Inhalte zu erzeugen.

GET /api/v1/posts Alle Beiträge auflisten
Parâmetros de Query
NameTypObrigatórioDescrição
status string optional Nach Status filtern: Entwurf | geplant | veröffentlicht | fehlgeschlagen
page integer optional Seitennummer (Standard: 1)
pageSize integer optional Einträge pro Seite, maximal 100 (Standard: 20)
cURL
curl https://useinmedia.com/api/v1/posts \
  -H "Authorization: Bearer sk_..."
Antwort
[
  {
    "id": "3f7a1b2c-...",
    "workspaceId": "a1b2c3d4-...",
    "projectId": "e5f6g7h8-...",
    "title": "Air Jordan launch",
    "prompt": "Bold Instagram post for sneaker drop",
    "status": "published",
    "imageUrl": "https://...",
    "hasVideo": false,
    "format": "instagram_square",
    "createdAt": "2026-04-14T12:00:00Z"
  }
]
POST /api/v1/posts Erstelle einen Beitrag
Body-Parameter
NameTypObrigatórioDescrição
title string required Beitragstitel (max. 200 Zeichen)
prompt string required Generierungsaufforderung (max. 5000 Zeichen)
projectId guid required Projekt, mit dem der Beitrag verknüpft werden soll
brandKitId guid optional Brand Kit, das bei der Generierung angewendet werden soll
Anfragekörper
{
  "title": "Air Jordan launch",
  "prompt": "Bold Instagram post for a sneaker drop. Black and gold palette.",
  "projectId": "e5f6g7h8-...",
  "brandKitId": "k1l2m3n4-..."
}
cURL
curl https://useinmedia.com/api/v1/posts \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "title": "Air Jordan launch", "prompt": "Bold Instagram post for a sneaker drop. Black and gold palette.", "projectId": "e5f6g7h8-...", "brandKitId": "k1l2m3n4-..." }'
Antwort
{
  "id": "3f7a1b2c-...",
  "title": "Air Jordan launch",
  "status": "draft",
  "imageUrl": "https://...",
  "hasVideo": false,
  "createdAt": "2026-04-14T12:00:00Z"
}
GET /api/v1/posts/ {id} Beitrag anhand der ID abrufen
cURL
curl https://useinmedia.com/api/v1/posts/<id> \
  -H "Authorization: Bearer sk_..."
Antwort
{
  "id": "3f7a1b2c-...",
  "workspaceId": "a1b2c3d4-...",
  "projectId": "e5f6g7h8-...",
  "title": "Air Jordan launch",
  "prompt": "Bold Instagram post for sneaker drop",
  "status": "published",
  "imageUrl": "https://...",
  "hasVideo": false,
  "format": "instagram_square",
  "brandKitId": null,
  "scheduledAt": null,
  "publishedAt": "2026-04-14T15:30:00Z",
  "createdAt": "2026-04-14T12:00:00Z",
  "updatedAt": "2026-04-14T15:30:00Z"
}
GET /api/v1/posts/project/ {projectId} Beiträge aus einem Projekt auflisten
cURL
curl https://useinmedia.com/api/v1/posts/project/<projectId> \
  -H "Authorization: Bearer sk_..."
Antwort
[ { "id": "...", "title": "..." } ]
PUT /api/v1/posts/ {id} Beitrag aktualisieren
Body-Parameter
NameTypObrigatórioDescrição
title string optional Neuer Titel (max. 200 Zeichen)
prompt string optional Neue Aufforderung (max. 5000 Zeichen)
status string optional draft | scheduled | published | failed
scheduledAt datetime optional Geplante Datum/Uhrzeit ISO 8601
brandKitId guid optional Brand Kit, das angewendet werden soll
Anfragekörper
{ "title": "Updated title", "status": "draft" }
cURL
curl https://useinmedia.com/api/v1/posts/<id> \
  -X PUT \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "title": "Updated title", "status": "draft" }'
Antwort
{
  "id": "3f7a1b2c-...",
  "title": "Updated title",
  "status": "draft",
  "updatedAt": "2026-04-14T13:00:00Z"
}
DELETE /api/v1/posts/ {id} Beitrag löschen
cURL
curl https://useinmedia.com/api/v1/posts/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwort
204 No Content
POST /api/v1/posts/ {id} /generate KI-Inhalt für einen Beitrag generieren (oder neu generieren)
Body-Parameter
NameTypObrigatórioDescrição
prompt string optional Neue Aufforderung; weglassen, um mit der bestehenden Aufforderung neu zu generieren
format string optional Proporção: 1:1 | 9:16 | 16:9 (padrão: 1:1)
Anfragekörper
{ "prompt": "Make it more energetic", "format": "1:1" }
cURL
curl https://useinmedia.com/api/v1/posts/<id>/generate \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "prompt": "Make it more energetic", "format": "1:1" }'
Antwort
{
  "post": {
    "id": "3f7a1b2c-...",
    "status": "draft",
    "imageUrl": "https://...",
    "hasVideo": false,
    "updatedAt": "2026-04-14T13:00:00Z"
  },
  "respond": "Updated the design with more vibrant colors."
}
POST /api/v1/posts/ {id} /render Aktuelle Version des Beitrags als Bild rendern (PNG/JPEG)
cURL
curl https://useinmedia.com/api/v1/posts/<id>/render \
  -X POST \
  -H "Authorization: Bearer sk_..."
Antwort
{ "id": "...", "imageUrl": "https://...", "status": "draft" }
POST /api/v1/posts/ {id} /publish Beitrag als veröffentlicht markieren
cURL
curl https://useinmedia.com/api/v1/posts/<id>/publish \
  -X POST \
  -H "Authorization: Bearer sk_..."
Antwort
{ "id": "...", "status": "published", "publishedAt": "2026-04-14T15:30:00Z" }
POST /api/v1/posts/ {id} /schedule Beitrag für zukünftige Veröffentlichung planen
Body-Parameter
NameTypObrigatórioDescrição
scheduledAt datetime required Veröffentlichungsdatum/Uhrzeit ISO 8601 (UTC)
Anfragekörper
{ "scheduledAt": "2026-04-15T09:00:00Z" }
cURL
curl https://useinmedia.com/api/v1/posts/<id>/schedule \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "scheduledAt": "2026-04-15T09:00:00Z" }'
Antwort
{ "id": "...", "status": "scheduled", "scheduledAt": "2026-04-15T09:00:00Z" }
POST /api/v1/posts/ {id} /publish-social Beitrag auf verbundenen sozialen Netzwerken veröffentlichen (oder planen)
Body-Parameter
NameTypObrigatórioDescrição
connectionIds guid[] required Liste der Social-Connection-IDs zum Veröffentlichen
scheduledAt datetime optional Falls angegeben, planen statt sofort zu veröffentlichen
Anfragekörper
{
  "connectionIds": ["conn-uuid-1", "conn-uuid-2"],
  "scheduledAt": null
}
cURL
curl https://useinmedia.com/api/v1/posts/<id>/publish-social \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "connectionIds": ["conn-uuid-1", "conn-uuid-2"], "scheduledAt": null }'
Antwort
[
  {
    "connectionId": "conn-uuid-1",
    "platform": "Instagram",
    "status": "Published",
    "externalPostId": "ext-123",
    "errorMessage": null
  }
]
GET /api/v1/posts/ {id} /publish-targets Social-Publishing-Ziele und Status eines Beitrags abfragen
cURL
curl https://useinmedia.com/api/v1/posts/<id>/publish-targets \
  -H "Authorization: Bearer sk_..."
Antwort
[
  {
    "connectionId": "conn-uuid-1",
    "platform": "Instagram",
    "status": "Published",
    "externalPostId": "ext-123",
    "errorMessage": null
  }
]
GET /api/v1/posts/ {id} /download Beitragsbild als Datei herunterladen
Parâmetros de Query
NameTypObrigatórioDescrição
format string optional png (padrão) ou jpg
cURL
curl https://useinmedia.com/api/v1/posts/<id>/download \
  -H "Authorization: Bearer sk_..."
Antwort
Binäre Datei (image/png oder image/jpeg)
GET /api/v1/posts/ {id} /versions Gespeicherte Versionen eines Beitrags auflisten
cURL
curl https://useinmedia.com/api/v1/posts/<id>/versions \
  -H "Authorization: Bearer sk_..."
Antwort
[
  {
    "id": "ver-uuid-...",
    "versionNumber": 3,
    "label": "Dark theme variant",
    "createdAt": "2026-04-14T12:00:00Z"
  }
]
POST /api/v1/posts/ {id} /versions/ {versionId} /restore Beitrag auf eine frühere Version zurücksetzen
cURL
curl https://useinmedia.com/api/v1/posts/<id>/versions/<versionId>/restore \
  -X POST \
  -H "Authorization: Bearer sk_..."
Antwort
{ "id": "...", "status": "draft", "imageUrl": "https://...", "updatedAt": "2026-04-14T13:00:00Z" }

Projects

Organisieren Sie Beiträge unter Projekten. Der Starter-Plan ist auf 3 aktive Projekte begrenzt.

GET /api/v1/projects Projekte auflisten
Parâmetros de Query
NameTypObrigatórioDescrição
status string optional Filter: aktiv | archiviert
cURL
curl https://useinmedia.com/api/v1/projects \
  -H "Authorization: Bearer sk_..."
Antwort
[
  {
    "id": "e5f6g7h8-...",
    "name": "Nike Campaign",
    "description": "Q2 2026 drop",
    "icon": "👟",
    "color": "#00f2ff",
    "status": "active",
    "createdAt": "2026-01-10T09:00:00Z"
  }
]
POST /api/v1/projects Projekt erstellen
Body-Parameter
NameTypObrigatórioDescrição
name string required Projektname
description string optional Optionale Beschreibung
icon string optional Emoji-Symbol
color string optional Hex-Farbe z. B.: #00f2ff
Anfragekörper
{
  "name": "Nike Campaign",
  "description": "Q2 2026 drop",
  "icon": "👟",
  "color": "#00f2ff"
}
cURL
curl https://useinmedia.com/api/v1/projects \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "name": "Nike Campaign", "description": "Q2 2026 drop", "icon": "👟", "color": "#00f2ff" }'
Antwort
{
  "id": "e5f6g7h8-...",
  "name": "Nike Campaign",
  "status": "active",
  "createdAt": "2026-04-14T12:00:00Z"
}
PUT /api/v1/projects/ {id} Projekt aktualisieren
Body-Parameter
NameTypObrigatórioDescrição
name string optional Neuer Name
description string optional Neue Beschreibung
status string optional aktiv | archiviert
Anfragekörper
{ "name": "Nike Campaign v2", "status": "archived" }
cURL
curl https://useinmedia.com/api/v1/projects/<id> \
  -X PUT \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "name": "Nike Campaign v2", "status": "archived" }'
Antwort
{ "id": "...", "name": "Nike Campaign v2", "status": "archived" }
GET /api/v1/projects/ {id} Projekt anhand der ID finden
cURL
curl https://useinmedia.com/api/v1/projects/<id> \
  -H "Authorization: Bearer sk_..."
Antwort
{
  "id": "e5f6g7h8-...",
  "name": "Nike Campaign",
  "description": "Q2 2026 drop",
  "icon": "👟",
  "color": "#00f2ff",
  "status": "active",
  "coverUrl": "https://...",
  "createdAt": "2026-01-10T09:00:00Z"
}
POST /api/v1/projects/ {id} /cover Titelbild zu einem Projekt hochladen (multipart/form-data)
Body-Parameter
NameTypObrigatórioDescrição
file file required JPEG, PNG oder WebP. Max. 10 MB
cURL
curl https://useinmedia.com/api/v1/projects/<id>/cover \
  -X POST \
  -H "Authorization: Bearer sk_..."
Antwort
{ "id": "...", "coverUrl": "https://...", "name": "Nike Campaign" }
DELETE /api/v1/projects/ {id} /cover Titelbild aus einem Projekt entfernen
cURL
curl https://useinmedia.com/api/v1/projects/<id>/cover \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwort
204 No Content
DELETE /api/v1/projects/ {id} Projekt löschen
cURL
curl https://useinmedia.com/api/v1/projects/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwort
204 No Content

Brand Kits

Speichern Sie Markenfarben, Schriftarten und Logos. Der Starter-Plan ist auf 1 Brand Kit begrenzt.

GET /api/v1/brandkits Brand Kits auflisten
cURL
curl https://useinmedia.com/api/v1/brandkits \
  -H "Authorization: Bearer sk_..."
Antwort
[
  {
    "id": "k1l2m3n4-...",
    "name": "Main Brand",
    "colorsJson": "{\"primary\":\"#00f2ff\",\"secondary\":\"#020408\"}",
    "fontsJson": "{\"heading\":\"Plus Jakarta Sans\",\"body\":\"Inter\"}",
    "logoUrl": "https://..."
  }
]
POST /api/v1/brandkits Brand Kit erstellen
Body-Parameter
NameTypObrigatórioDescrição
name string required Name des Brand Kits
colors.primary string optional Primärfarbe hex
colors.secondary string optional Sekundärfarbe hex
colors.accent string optional Akzentfarbe hex
colors.neutral string optional Neutralfarbe hex
fonts.heading string optional Titelschriftart
fonts.body string optional Körperquelle
logoUrl string optional Öffentliche URL des Logobildes
Anfragekörper
{
  "name": "Main Brand",
  "colors": {
    "primary": "#00f2ff",
    "secondary": "#020408",
    "accent": "#ffffff",
    "neutral": "#888888"
  },
  "fonts": {
    "heading": "Plus Jakarta Sans",
    "body": "Inter"
  },
  "logoUrl": "https://example.com/logo.png"
}
cURL
curl https://useinmedia.com/api/v1/brandkits \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "name": "Main Brand", "colors": { "primary": "#00f2ff", "secondary": "#020408", "accent": "#ffffff", "neutral": "#888888" }, "fonts": { "heading": "Plus Jakarta Sans", "body": "Inter" }, "logoUrl": "https://example.com/logo.png" }'
Antwort
{ "id": "k1l2m3n4-...", "name": "Main Brand", ... }
PUT /api/v1/brandkits/ {id} Brand Kit aktualisieren
Body-Parameter
NameTypObrigatórioDescrição
name string optional Neuer Name
colors object optional Farben zu aktualisieren (gleicher Format wie bei Erstellen)
fonts object optional Schriften zu aktualisieren
Anfragekörper
{ "colors": { "primary": "#ff5733" } }
cURL
curl https://useinmedia.com/api/v1/brandkits/<id> \
  -X PUT \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "colors": { "primary": "#ff5733" } }'
Antwort
{ "id": "...", "name": "Main Brand", ... }
GET /api/v1/brandkits/ {id} Ein Brand Kit nach ID finden
cURL
curl https://useinmedia.com/api/v1/brandkits/<id> \
  -H "Authorization: Bearer sk_..."
Antwort
{
  "id": "k1l2m3n4-...",
  "name": "Main Brand",
  "colorsJson": "{\"primary\":\"#00f2ff\",\"secondary\":\"#020408\"}",
  "fontsJson": "{\"heading\":\"Plus Jakarta Sans\",\"body\":\"Inter\"}",
  "logoUrl": "https://..."
}
DELETE /api/v1/brandkits/ {id} Ein Brand Kit löschen
cURL
curl https://useinmedia.com/api/v1/brandkits/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwort
204 No Content

Zeitpläne

Automatisieren Sie die wiederkehrende Inhaltserstellung mit Cron-Zeitplänen. Erfordert Growth-Plan.

Erfordert Growth+ Plan
GET /api/v1/schedules Zeitpläne auflisten
cURL
curl https://useinmedia.com/api/v1/schedules \
  -H "Authorization: Bearer sk_..."
Antwort
[
  {
    "id": "s1s2s3s4-...",
    "name": "Daily Instagram Post",
    "cronExpression": "0 9 * * *",
    "isActive": true,
    "promptTemplate": "Generate a motivational post for today.",
    "nextRunAt": "2026-04-15T09:00:00Z"
  }
]
POST /api/v1/schedules Ein Zeitplan erstellen Growth+
Body-Parameter
NameTypObrigatórioDescrição
name string required Zeitplanname
cronExpression string required Cron-Ausdruck mit 5 Feldern, z. B.: "0 9 * * 1"
promptTemplate string optional Prompt, der bei jedem Lauf verwendet wird (max. 5000 Zeichen)
projectId guid optional Projekt der generierten Beiträge
brandKitId guid optional Brand Kit zum Anwenden
Anfragekörper
{
  "name": "Daily Instagram Post",
  "cronExpression": "0 9 * * *",
  "promptTemplate": "Generate a motivational post for today.",
  "projectId": "e5f6g7h8-...",
  "brandKitId": "k1l2m3n4-..."
}
cURL
curl https://useinmedia.com/api/v1/schedules \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "name": "Daily Instagram Post", "cronExpression": "0 9 * * *", "promptTemplate": "Generate a motivational post for today.", "projectId": "e5f6g7h8-...", "brandKitId": "k1l2m3n4-..." }'
Antwort
{
  "id": "s1s2s3s4-...",
  "name": "Daily Instagram Post",
  "cronExpression": "0 9 * * *",
  "isActive": true,
  "nextRunAt": "2026-04-15T09:00:00Z"
}
PUT /api/v1/schedules/ {id} Ein Zeitplan aktualisieren
Body-Parameter
NameTypObrigatórioDescrição
name string optional Neuer Name
cronExpression string optional Neuer Cron-Ausdruck
isActive boolean optional Zeitplan aktivieren oder deaktivieren
promptTemplate string optional Neues Prompt-Template
Anfragekörper
{ "isActive": false }
cURL
curl https://useinmedia.com/api/v1/schedules/<id> \
  -X PUT \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "isActive": false }'
Antwort
{ "id": "...", "isActive": false, ... }
GET /api/v1/schedules/ {id} Ein Zeitplan nach ID finden
cURL
curl https://useinmedia.com/api/v1/schedules/<id> \
  -H "Authorization: Bearer sk_..."
Antwort
{
  "id": "s1s2s3s4-...",
  "name": "Daily Instagram Post",
  "cronExpression": "0 9 * * *",
  "isActive": true,
  "promptTemplate": "Generate a motivational post for today.",
  "lastRunAt": "2026-04-13T09:00:00Z",
  "nextRunAt": "2026-04-15T09:00:00Z"
}
DELETE /api/v1/schedules/ {id} Ein Zeitplan löschen
cURL
curl https://useinmedia.com/api/v1/schedules/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwort
204 No Content

Webhooks

Erhalten Sie Echtzeit-HTTP-Benachrichtigungen, wenn Ereignisse in Ihrem Arbeitsbereich auftreten. Erfordert Growth-Plan.

Erfordert Growth+ Plan
GET /api/v1/webhooks Webhooks auflisten
cURL
curl https://useinmedia.com/api/v1/webhooks \
  -H "Authorization: Bearer sk_..."
Antwort
[
  {
    "id": "w1w2w3w4-...",
    "url": "https://yourapp.com/hooks/inmedia",
    "events": "post.published,post.failed",
    "isActive": true,
    "lastTriggeredAt": "2026-04-14T10:00:00Z"
  }
]
POST /api/v1/webhooks Ein Webhook registrieren Growth+
Body-Parameter
NameTypObrigatórioDescrição
url string required HTTPS-Endpunkt zum Empfangen von Ereignissen
events string required Ereignisnamen, getrennt durch Kommas (siehe Abschnitt Ereignisse)
secret string optional Optionales Geheimnis zur HMAC-SHA256-Signaturverifizierung
Anfragekörper
{
  "url": "https://yourapp.com/hooks/inmedia",
  "events": "post.published,post.failed",
  "secret": "my-webhook-secret"
}
cURL
curl https://useinmedia.com/api/v1/webhooks \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "url": "https://yourapp.com/hooks/inmedia", "events": "post.published,post.failed", "secret": "my-webhook-secret" }'
Antwort
{
  "id": "w1w2w3w4-...",
  "url": "https://yourapp.com/hooks/inmedia",
  "events": "post.published,post.failed",
  "isActive": true,
  "createdAt": "2026-04-14T12:00:00Z"
}
PUT /api/v1/webhooks/ {id} Webhook aktualisieren
Body-Parameter
NameTypObrigatórioDescrição
url string optional Neue URL des Endpunkts
events string optional Neue Liste von Ereignissen
isActive boolean optional Aktivieren oder deaktivieren
Anfragekörper
{ "isActive": false }
cURL
curl https://useinmedia.com/api/v1/webhooks/<id> \
  -X PUT \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "isActive": false }'
Antwort
{ "id": "...", "isActive": false, ... }
DELETE /api/v1/webhooks/ {id} Webhook löschen
cURL
curl https://useinmedia.com/api/v1/webhooks/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwort
204 No Content

Video

Abfragen von Videoerstellungsaufträgen und Abrufen von vorab signierten URLs. Die Videoerstellung wird vom Dashboard-Editor gestartet.

Erfordert Growth+ Plan
GET /api/v1/video/jobs/ {jobId} Status eines Video-Render-Jobs abfragen Growth+
cURL
curl https://useinmedia.com/api/v1/video/jobs/<jobId> \
  -H "Authorization: Bearer sk_..."
Antwort
{
  "status": "done",
  "postId": "e5f6g7h8-...",
  "videoUrl": "https://presigned-s3-url...",
  "message": "Video generated successfully!",
  "error": null
}
GET /api/v1/video/presign/ {postId} Aktualisierte signierte URL für das Video eines Beitrags erhalten Growth+
cURL
curl https://useinmedia.com/api/v1/video/presign/<postId> \
  -H "Authorization: Bearer sk_..."
Antwort
{ "url": "https://presigned-s3-url..." }

Verwendung

Überprüfen Sie Ihr Plan-Kontingent und die Erstellungsaktivität.

GET /api/v1/usage/activity Generierungsaktivitäten abfragen
Parâmetros de Query
NameTypObrigatórioDescrição
page integer optional Seitennummer (Standard: 1)
pageSize integer optional Einträge pro Seite (Standard: 50)
cURL
curl https://useinmedia.com/api/v1/usage/activity \
  -H "Authorization: Bearer sk_..."
Antwort
{
  "activity": [
    {
      "id": "t1t2t3t4-...",
      "type": "PostGeneration",
      "typeLabel": "Content generation",
      "description": "Air Jordan launch",
      "createdAt": "2026-04-14T12:00:00Z"
    }
  ]
}

API Keys

Erstellen und verwalten Sie programmatische API-Schlüssel. Erfordert Growth-Plan.

Erfordert Growth+ Plan
GET /api/v1/api-keys API-Schlüssel auflisten
cURL
curl https://useinmedia.com/api/v1/api-keys \
  -H "Authorization: Bearer sk_..."
Antwort
[
  {
    "id": "key-uuid-...",
    "name": "Production key",
    "keyPrefix": "sk_abcd",
    "isActive": true,
    "lastUsedAt": "2026-04-13T08:00:00Z",
    "expiresAt": null,
    "createdAt": "2026-01-01T00:00:00Z"
  }
]
POST /api/v1/api-keys API-Schlüssel erstellen Growth+
Body-Parameter
NameTypObrigatórioDescrição
name string required Beschreibender Name für den Schlüssel
expiresAt datetime optional Optionale Ablaufzeit (ISO 8601)
Anfragekörper
{ "name": "Production key" }
cURL
curl https://useinmedia.com/api/v1/api-keys \
  -X POST \
  -H "Authorization: Bearer sk_..." \
  -H "Content-Type: application/json" \
  -d '{ "name": "Production key" }'
Antwort
{
  "id": "key-uuid-...",
  "key": "sk_aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890abcd",
  "prefix": "sk_aBcDe",
  "name": "Production key"
}
DELETE /api/v1/api-keys/ {id} API-Schlüssel widerrufen
cURL
curl https://useinmedia.com/api/v1/api-keys/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwort
204 No Content
POST /api/v1/api-keys/ {id} /regenerate API-Schlüssel neu generieren
cURL
curl https://useinmedia.com/api/v1/api-keys/<id>/regenerate \
  -X POST \
  -H "Authorization: Bearer sk_..."
Antwort
{ "id": "...", "key": "sk_NEW...", "prefix": "sk_NEW" }