Inloggen
Functies Video AI Prijzen Vergelijken Blog Nu beginnen
DOCUMENTATIE VOOR ONTWIKKELAARS

Referência da API

Volledige referentie voor de InMedia REST API. Alle eindpunten vereisen authenticatie via API-sleutel.

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).

Verplichte headers

Authorization: Bearer sk_aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890abcd
Content-Type: application/json

De workspace wordt automatisch bepaald vanuit de API-sleutel. Geen X-Workspace-Id-header nodig. De sleutel wordt alleen één keer getoond bij aanmaak; bewaar deze op een veilige manier.

Snel voorbeeld. Een post maken

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);

Foutcodes

CodeBetekenis
400Ongeldige aanvraag. Parameters onjuist
401Niet geautoriseerd. Ontbrekende of ongeldige API-sleutel
403Verboden. Resource niet beschikbaar in uw plan
404Niet gevonden. Resource bestaat niet
429Limiet overschreden. Verlaag de frequentie

Webhook-gebeurtenissen

Geef een door komma's gescheiden lijst van gebeurtenisnamen door aan het events-veld wanneer u een webhook maakt.

post.generated
Wordt geactiveerd wanneer de AI klaar is met het genereren van een bericht
post.published
Wordt geactiveerd wanneer een bericht met succes wordt gepubliceerd
post.scheduled
Wordt geactiveerd wanneer een bericht is gepland voor toekomstige publicatie
post.failed
Wordt geactiveerd wanneer het genereren of publiceren van een bericht mislukt
video.completed
Wordt geactiveerd wanneer een videorenderingjob is voltooid
video.failed
Wordt geactiveerd wanneer een videorenderingjob mislukt

Payload-formaat

Elke webhook-aflevering is een POST-aanvraag met het volgende JSON-lichaam:

{
  "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

Als u een geheim opgeeft wanneer u een webhook maakt, zal InMedia elke aflevering ondertekenen met HMAC-SHA256. Verifieer de handtekening om ervoor te zorgen dat het verzoek afkomstig is van InMedia.

Handtekeningheader

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

De waarde is de HMAC-SHA256-hex-digest van het onbewerkte aanvraagbody met uw webhook-geheim als sleutel.

Handtekeningverificatie

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

Maak en beheer berichten. Bel POST /{id}/generate na het maken van een bericht om AI-inhoud te produceren.

GET /api/v1/posts Alle berichten weergeven
Queryparameters
NaamTypeObrigatórioDescrição
status string optional Filteren op status: concept | gepland | gepubliceerd | mislukt
page integer optional Paginanummer (standaard: 1)
pageSize integer optional Aantal items per pagina, max 100 (standaard: 20)
cURL
curl https://useinmedia.com/api/v1/posts \
  -H "Authorization: Bearer sk_..."
Antwoord
[
  {
    "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 Een bericht maken
Bodyparameters
NaamTypeObrigatórioDescrição
title string required Berichttitel (max 200 tekens)
prompt string required Generatieprompt (max 5000 tekens)
projectId guid required Project om de post aan te koppelen
brandKitId guid optional Brand Kit om toe te passen bij generatie
Aanvraagbody
{
  "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-..." }'
Antwoord
{
  "id": "3f7a1b2c-...",
  "title": "Air Jordan launch",
  "status": "draft",
  "imageUrl": "https://...",
  "hasVideo": false,
  "createdAt": "2026-04-14T12:00:00Z"
}
GET /api/v1/posts/ {id} Post ophalen op basis van ID
cURL
curl https://useinmedia.com/api/v1/posts/<id> \
  -H "Authorization: Bearer sk_..."
Antwoord
{
  "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} Lijst met posts van een project
cURL
curl https://useinmedia.com/api/v1/posts/project/<projectId> \
  -H "Authorization: Bearer sk_..."
Antwoord
[ { "id": "...", "title": "..." } ]
PUT /api/v1/posts/ {id} Een post bijwerken
Bodyparameters
NaamTypeObrigatórioDescrição
title string optional Nieuwe titel (max 200 tekens)
prompt string optional Nieuwe prompt (max 5000 tekens)
status string optional draft | scheduled | published | failed
scheduledAt datetime optional Geplande datum/tijd ISO 8601
brandKitId guid optional Brand Kit om toe te passen
Aanvraagbody
{ "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" }'
Antwoord
{
  "id": "3f7a1b2c-...",
  "title": "Updated title",
  "status": "draft",
  "updatedAt": "2026-04-14T13:00:00Z"
}
DELETE /api/v1/posts/ {id} Een post verwijderen
cURL
curl https://useinmedia.com/api/v1/posts/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwoord
204 No Content
POST /api/v1/posts/ {id} /generate AI-inhoud genereren (of opnieuw genereren) voor een post
Bodyparameters
NaamTypeObrigatórioDescrição
prompt string optional Nieuwe prompt; weglaten om opnieuw te genereren met de bestaande prompt
format string optional Proporção: 1:1 | 9:16 | 16:9 (padrão: 1:1)
Aanvraagbody
{ "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" }'
Antwoord
{
  "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 Huidige versie van de post weergeven als afbeelding (PNG/JPEG)
cURL
curl https://useinmedia.com/api/v1/posts/<id>/render \
  -X POST \
  -H "Authorization: Bearer sk_..."
Antwoord
{ "id": "...", "imageUrl": "https://...", "status": "draft" }
POST /api/v1/posts/ {id} /publish Een post markeren als gepubliceerd
cURL
curl https://useinmedia.com/api/v1/posts/<id>/publish \
  -X POST \
  -H "Authorization: Bearer sk_..."
Antwoord
{ "id": "...", "status": "published", "publishedAt": "2026-04-14T15:30:00Z" }
POST /api/v1/posts/ {id} /schedule Een post plannen voor toekomstige publicatie
Bodyparameters
NaamTypeObrigatórioDescrição
scheduledAt datetime required Publicatiedatum/tijd ISO 8601 (UTC)
Aanvraagbody
{ "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" }'
Antwoord
{ "id": "...", "status": "scheduled", "scheduledAt": "2026-04-15T09:00:00Z" }
POST /api/v1/posts/ {id} /publish-social Een post publiceren (of plannen) op aangesloten sociale netwerken
Bodyparameters
NaamTypeObrigatórioDescrição
connectionIds guid[] required Lijst met sociale verbinding-ID's om te publiceren
scheduledAt datetime optional Als opgegeven, plannen in plaats van onmiddellijk publiceren
Aanvraagbody
{
  "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 }'
Antwoord
[
  {
    "connectionId": "conn-uuid-1",
    "platform": "Instagram",
    "status": "Published",
    "externalPostId": "ext-123",
    "errorMessage": null
  }
]
GET /api/v1/posts/ {id} /publish-targets Sociale publicatiebestemmingen en status van een post opvragen
cURL
curl https://useinmedia.com/api/v1/posts/<id>/publish-targets \
  -H "Authorization: Bearer sk_..."
Antwoord
[
  {
    "connectionId": "conn-uuid-1",
    "platform": "Instagram",
    "status": "Published",
    "externalPostId": "ext-123",
    "errorMessage": null
  }
]
GET /api/v1/posts/ {id} /download Afbeelding van de post downloaden als bestand
Queryparameters
NaamTypeObrigatórioDescrição
format string optional png (padrão) ou jpg
cURL
curl https://useinmedia.com/api/v1/posts/<id>/download \
  -H "Authorization: Bearer sk_..."
Antwoord
Binaire bestand (image/png of image/jpeg)
GET /api/v1/posts/ {id} /versions Lijst met opgeslagen versies van een post
cURL
curl https://useinmedia.com/api/v1/posts/<id>/versions \
  -H "Authorization: Bearer sk_..."
Antwoord
[
  {
    "id": "ver-uuid-...",
    "versionNumber": 3,
    "label": "Dark theme variant",
    "createdAt": "2026-04-14T12:00:00Z"
  }
]
POST /api/v1/posts/ {id} /versions/ {versionId} /restore Een post herstellen naar een eerdere versie
cURL
curl https://useinmedia.com/api/v1/posts/<id>/versions/<versionId>/restore \
  -X POST \
  -H "Authorization: Bearer sk_..."
Antwoord
{ "id": "...", "status": "draft", "imageUrl": "https://...", "updatedAt": "2026-04-14T13:00:00Z" }

Projects

Organiseer berichten onder projecten. Het Starter-abonnement is beperkt tot 3 actieve projecten.

GET /api/v1/projects Lijst met projecten
Queryparameters
NaamTypeObrigatórioDescrição
status string optional Filter: actief | gearchiveerd
cURL
curl https://useinmedia.com/api/v1/projects \
  -H "Authorization: Bearer sk_..."
Antwoord
[
  {
    "id": "e5f6g7h8-...",
    "name": "Nike Campaign",
    "description": "Q2 2026 drop",
    "icon": "👟",
    "color": "#00f2ff",
    "status": "active",
    "createdAt": "2026-01-10T09:00:00Z"
  }
]
POST /api/v1/projects Een project maken
Bodyparameters
NaamTypeObrigatórioDescrição
name string required Projectnaam
description string optional Optionele beschrijving
icon string optional Emoji icoon
color string optional Hex kleur bijv: #00f2ff
Aanvraagbody
{
  "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" }'
Antwoord
{
  "id": "e5f6g7h8-...",
  "name": "Nike Campaign",
  "status": "active",
  "createdAt": "2026-04-14T12:00:00Z"
}
PUT /api/v1/projects/ {id} Een project bijwerken
Bodyparameters
NaamTypeObrigatórioDescrição
name string optional Nieuwe naam
description string optional Nieuwe beschrijving
status string optional actief | gearchiveerd
Aanvraagbody
{ "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" }'
Antwoord
{ "id": "...", "name": "Nike Campaign v2", "status": "archived" }
GET /api/v1/projects/ {id} Een project vinden op ID
cURL
curl https://useinmedia.com/api/v1/projects/<id> \
  -H "Authorization: Bearer sk_..."
Antwoord
{
  "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 Upload een omslagafbeelding naar een project (multipart/form-data)
Bodyparameters
NaamTypeObrigatórioDescrição
file file required JPEG, PNG of WebP. Max 10 MB
cURL
curl https://useinmedia.com/api/v1/projects/<id>/cover \
  -X POST \
  -H "Authorization: Bearer sk_..."
Antwoord
{ "id": "...", "coverUrl": "https://...", "name": "Nike Campaign" }
DELETE /api/v1/projects/ {id} /cover De omslagafbeelding uit een project verwijderen
cURL
curl https://useinmedia.com/api/v1/projects/<id>/cover \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwoord
204 No Content
DELETE /api/v1/projects/ {id} Een project verwijderen
cURL
curl https://useinmedia.com/api/v1/projects/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwoord
204 No Content

Brand Kits

Sla merkkleuren, lettertypen en logo's op. Het Starter-abonnement is beperkt tot 1 Brand Kit.

GET /api/v1/brandkits Brand Kits weergeven
cURL
curl https://useinmedia.com/api/v1/brandkits \
  -H "Authorization: Bearer sk_..."
Antwoord
[
  {
    "id": "k1l2m3n4-...",
    "name": "Main Brand",
    "colorsJson": "{\"primary\":\"#00f2ff\",\"secondary\":\"#020408\"}",
    "fontsJson": "{\"heading\":\"Plus Jakarta Sans\",\"body\":\"Inter\"}",
    "logoUrl": "https://..."
  }
]
POST /api/v1/brandkits Een Brand Kit maken
Bodyparameters
NaamTypeObrigatórioDescrição
name string required Naam van het Brand Kit
colors.primary string optional Primaire hex kleur
colors.secondary string optional Secundaire hex kleur
colors.accent string optional Kleur van de highlight hex
colors.neutral string optional Neutrale hex kleur
fonts.heading string optional Titelfont
fonts.body string optional Lettertype van de body
logoUrl string optional Openbare URL van het logo-afbeelding
Aanvraagbody
{
  "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" }'
Antwoord
{ "id": "k1l2m3n4-...", "name": "Main Brand", ... }
PUT /api/v1/brandkits/ {id} Een Brand Kit bijwerken
Bodyparameters
NaamTypeObrigatórioDescrição
name string optional Nieuwe naam
colors object optional Kleuren om bij te werken (zelfde formaat als create)
fonts object optional Lettertypen om bij te werken
Aanvraagbody
{ "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" } }'
Antwoord
{ "id": "...", "name": "Main Brand", ... }
GET /api/v1/brandkits/ {id} Zoek een Brand Kit op ID
cURL
curl https://useinmedia.com/api/v1/brandkits/<id> \
  -H "Authorization: Bearer sk_..."
Antwoord
{
  "id": "k1l2m3n4-...",
  "name": "Main Brand",
  "colorsJson": "{\"primary\":\"#00f2ff\",\"secondary\":\"#020408\"}",
  "fontsJson": "{\"heading\":\"Plus Jakarta Sans\",\"body\":\"Inter\"}",
  "logoUrl": "https://..."
}
DELETE /api/v1/brandkits/ {id} Verwijder een Brand Kit
cURL
curl https://useinmedia.com/api/v1/brandkits/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwoord
204 No Content

Plannen

Automatiseer regelmatige inhoudsgeneratie met cron-planningen. Vereist het Growth-abonnement.

Vereist Growth+ plan
GET /api/v1/schedules Lijst van plannen
cURL
curl https://useinmedia.com/api/v1/schedules \
  -H "Authorization: Bearer sk_..."
Antwoord
[
  {
    "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 Maak een planning Growth+
Bodyparameters
NaamTypeObrigatórioDescrição
name string required Planningsnaam
cronExpression string required Cron-expressie van 5 velden, bijv. "0 9 * * 1"
promptTemplate string optional Prompt die bij elke uitvoering wordt gebruikt (max 5000 tekens)
projectId guid optional Project van gegenereerde berichten
brandKitId guid optional Brand Kit om toe te passen
Aanvraagbody
{
  "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-..." }'
Antwoord
{
  "id": "s1s2s3s4-...",
  "name": "Daily Instagram Post",
  "cronExpression": "0 9 * * *",
  "isActive": true,
  "nextRunAt": "2026-04-15T09:00:00Z"
}
PUT /api/v1/schedules/ {id} Werk een planning bij
Bodyparameters
NaamTypeObrigatórioDescrição
name string optional Nieuwe naam
cronExpression string optional Nieuwe cron-expressie
isActive boolean optional Schakel de planning in of uit
promptTemplate string optional Nieuw prompt-sjabloon
Aanvraagbody
{ "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 }'
Antwoord
{ "id": "...", "isActive": false, ... }
GET /api/v1/schedules/ {id} Zoek een planning op ID
cURL
curl https://useinmedia.com/api/v1/schedules/<id> \
  -H "Authorization: Bearer sk_..."
Antwoord
{
  "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} Verwijder een planning
cURL
curl https://useinmedia.com/api/v1/schedules/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwoord
204 No Content

Webhooks

Ontvang real-time HTTP-meldingen wanneer gebeurtenissen plaatsvinden in uw workspace. Vereist het Growth-abonnement.

Vereist Growth+ plan
GET /api/v1/webhooks Lijst van webhooks
cURL
curl https://useinmedia.com/api/v1/webhooks \
  -H "Authorization: Bearer sk_..."
Antwoord
[
  {
    "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 Registreer een webhook Growth+
Bodyparameters
NaamTypeObrigatórioDescrição
url string required HTTPS-eindpunt om gebeurtenissen te ontvangen
events string required Gebeurtenisnamen gescheiden door komma's (zie sectie Gebeurtenissen)
secret string optional Optionele geheim voor HMAC-SHA256-handtekeningverificatie
Aanvraagbody
{
  "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" }'
Antwoord
{
  "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} Een webhook bijwerken
Bodyparameters
NaamTypeObrigatórioDescrição
url string optional Nieuwe URL van het eindpunt
events string optional Nieuwe lijst met gebeurtenissen
isActive boolean optional Inschakelen of uitschakelen
Aanvraagbody
{ "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 }'
Antwoord
{ "id": "...", "isActive": false, ... }
DELETE /api/v1/webhooks/ {id} Een webhook verwijderen
cURL
curl https://useinmedia.com/api/v1/webhooks/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwoord
204 No Content

Video

Poll video-generatiejobs en haal vooraf ondertekende URLs op. Video-generatie wordt geïnitieerd vanuit de dashboard-editor.

Vereist Growth+ plan
GET /api/v1/video/jobs/ {jobId} De status van een videogeneratiejob opvragen Growth+
cURL
curl https://useinmedia.com/api/v1/video/jobs/<jobId> \
  -H "Authorization: Bearer sk_..."
Antwoord
{
  "status": "done",
  "postId": "e5f6g7h8-...",
  "videoUrl": "https://presigned-s3-url...",
  "message": "Video generated successfully!",
  "error": null
}
GET /api/v1/video/presign/ {postId} Bijgewerkte ondertekende URL voor een video van een bericht ophalen Growth+
cURL
curl https://useinmedia.com/api/v1/video/presign/<postId> \
  -H "Authorization: Bearer sk_..."
Antwoord
{ "url": "https://presigned-s3-url..." }

Gebruik

Controleer uw abonnementquotum en generatie-activiteit.

GET /api/v1/usage/activity Generatieactiviteiten opvragen
Queryparameters
NaamTypeObrigatórioDescrição
page integer optional Paginanummer (standaard: 1)
pageSize integer optional Items per pagina (standaard: 50)
cURL
curl https://useinmedia.com/api/v1/usage/activity \
  -H "Authorization: Bearer sk_..."
Antwoord
{
  "activity": [
    {
      "id": "t1t2t3t4-...",
      "type": "PostGeneration",
      "typeLabel": "Content generation",
      "description": "Air Jordan launch",
      "createdAt": "2026-04-14T12:00:00Z"
    }
  ]
}

API Keys

Maak en beheer programmatische API-sleutels. Vereist het Growth-abonnement.

Vereist Growth+ plan
GET /api/v1/api-keys API-sleutels opvragen
cURL
curl https://useinmedia.com/api/v1/api-keys \
  -H "Authorization: Bearer sk_..."
Antwoord
[
  {
    "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 Een API-sleutel maken Growth+
Bodyparameters
NaamTypeObrigatórioDescrição
name string required Beschrijvende naam voor de sleutel
expiresAt datetime optional Optionele verloopdatum (ISO 8601)
Aanvraagbody
{ "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" }'
Antwoord
{
  "id": "key-uuid-...",
  "key": "sk_aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890abcd",
  "prefix": "sk_aBcDe",
  "name": "Production key"
}
DELETE /api/v1/api-keys/ {id} Een API-sleutel intrekken
cURL
curl https://useinmedia.com/api/v1/api-keys/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Antwoord
204 No Content
POST /api/v1/api-keys/ {id} /regenerate Een API-sleutel opnieuw genereren
cURL
curl https://useinmedia.com/api/v1/api-keys/<id>/regenerate \
  -X POST \
  -H "Authorization: Bearer sk_..."
Antwoord
{ "id": "...", "key": "sk_NEW...", "prefix": "sk_NEW" }