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
| Code | Betekenis |
|---|---|
| 400 | Ongeldige aanvraag. Parameters onjuist |
| 401 | Niet geautoriseerd. Ontbrekende of ongeldige API-sleutel |
| 403 | Verboden. Resource niet beschikbaar in uw plan |
| 404 | Niet gevonden. Resource bestaat niet |
| 429 | Limiet 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.
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.
| Naam | Type | Obrigatório | Descriçã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 https://useinmedia.com/api/v1/posts \ -H "Authorization: Bearer sk_..."
[
{
"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"
}
]| Naam | Type | Obrigatório | Descriçã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 |
{
"title": "Air Jordan launch",
"prompt": "Bold Instagram post for a sneaker drop. Black and gold palette.",
"projectId": "e5f6g7h8-...",
"brandKitId": "k1l2m3n4-..."
}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-..." }'
{
"id": "3f7a1b2c-...",
"title": "Air Jordan launch",
"status": "draft",
"imageUrl": "https://...",
"hasVideo": false,
"createdAt": "2026-04-14T12:00:00Z"
}curl https://useinmedia.com/api/v1/posts/<id> \ -H "Authorization: Bearer sk_..."
{
"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"
}curl https://useinmedia.com/api/v1/posts/project/<projectId> \ -H "Authorization: Bearer sk_..."
[ { "id": "...", "title": "..." } ]| Naam | Type | Obrigatório | Descriçã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 |
{ "title": "Updated title", "status": "draft" }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" }'
{
"id": "3f7a1b2c-...",
"title": "Updated title",
"status": "draft",
"updatedAt": "2026-04-14T13:00:00Z"
}curl https://useinmedia.com/api/v1/posts/<id> \ -X DELETE \ -H "Authorization: Bearer sk_..."
204 No Content
| Naam | Type | Obrigatório | Descriçã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) |
{ "prompt": "Make it more energetic", "format": "1:1" }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" }'
{
"post": {
"id": "3f7a1b2c-...",
"status": "draft",
"imageUrl": "https://...",
"hasVideo": false,
"updatedAt": "2026-04-14T13:00:00Z"
},
"respond": "Updated the design with more vibrant colors."
}curl https://useinmedia.com/api/v1/posts/<id>/render \ -X POST \ -H "Authorization: Bearer sk_..."
{ "id": "...", "imageUrl": "https://...", "status": "draft" }curl https://useinmedia.com/api/v1/posts/<id>/publish \ -X POST \ -H "Authorization: Bearer sk_..."
{ "id": "...", "status": "published", "publishedAt": "2026-04-14T15:30:00Z" }| Naam | Type | Obrigatório | Descrição |
|---|---|---|---|
| scheduledAt | datetime | required | Publicatiedatum/tijd ISO 8601 (UTC) |
{ "scheduledAt": "2026-04-15T09:00:00Z" }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" }'
{ "id": "...", "status": "scheduled", "scheduledAt": "2026-04-15T09:00:00Z" }| Naam | Type | Obrigatório | Descrição |
|---|---|---|---|
| connectionIds | guid[] | required | Lijst met sociale verbinding-ID's om te publiceren |
| scheduledAt | datetime | optional | Als opgegeven, plannen in plaats van onmiddellijk publiceren |
{
"connectionIds": ["conn-uuid-1", "conn-uuid-2"],
"scheduledAt": null
}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 }'
[
{
"connectionId": "conn-uuid-1",
"platform": "Instagram",
"status": "Published",
"externalPostId": "ext-123",
"errorMessage": null
}
]curl https://useinmedia.com/api/v1/posts/<id>/publish-targets \ -H "Authorization: Bearer sk_..."
[
{
"connectionId": "conn-uuid-1",
"platform": "Instagram",
"status": "Published",
"externalPostId": "ext-123",
"errorMessage": null
}
]| Naam | Type | Obrigatório | Descrição |
|---|---|---|---|
| format | string | optional | png (padrão) ou jpg |
curl https://useinmedia.com/api/v1/posts/<id>/download \ -H "Authorization: Bearer sk_..."
Binaire bestand (image/png of image/jpeg)
curl https://useinmedia.com/api/v1/posts/<id>/versions \ -H "Authorization: Bearer sk_..."
[
{
"id": "ver-uuid-...",
"versionNumber": 3,
"label": "Dark theme variant",
"createdAt": "2026-04-14T12:00:00Z"
}
]curl https://useinmedia.com/api/v1/posts/<id>/versions/<versionId>/restore \ -X POST \ -H "Authorization: Bearer sk_..."
{ "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.
| Naam | Type | Obrigatório | Descrição |
|---|---|---|---|
| status | string | optional | Filter: actief | gearchiveerd |
curl https://useinmedia.com/api/v1/projects \ -H "Authorization: Bearer sk_..."
[
{
"id": "e5f6g7h8-...",
"name": "Nike Campaign",
"description": "Q2 2026 drop",
"icon": "👟",
"color": "#00f2ff",
"status": "active",
"createdAt": "2026-01-10T09:00:00Z"
}
]| Naam | Type | Obrigatório | Descrição |
|---|---|---|---|
| name | string | required | Projectnaam |
| description | string | optional | Optionele beschrijving |
| icon | string | optional | Emoji icoon |
| color | string | optional | Hex kleur bijv: #00f2ff |
{
"name": "Nike Campaign",
"description": "Q2 2026 drop",
"icon": "👟",
"color": "#00f2ff"
}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" }'
{
"id": "e5f6g7h8-...",
"name": "Nike Campaign",
"status": "active",
"createdAt": "2026-04-14T12:00:00Z"
}| Naam | Type | Obrigatório | Descrição |
|---|---|---|---|
| name | string | optional | Nieuwe naam |
| description | string | optional | Nieuwe beschrijving |
| status | string | optional | actief | gearchiveerd |
{ "name": "Nike Campaign v2", "status": "archived" }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" }'
{ "id": "...", "name": "Nike Campaign v2", "status": "archived" }curl https://useinmedia.com/api/v1/projects/<id> \ -H "Authorization: Bearer sk_..."
{
"id": "e5f6g7h8-...",
"name": "Nike Campaign",
"description": "Q2 2026 drop",
"icon": "👟",
"color": "#00f2ff",
"status": "active",
"coverUrl": "https://...",
"createdAt": "2026-01-10T09:00:00Z"
}| Naam | Type | Obrigatório | Descrição |
|---|---|---|---|
| file | file | required | JPEG, PNG of WebP. Max 10 MB |
curl https://useinmedia.com/api/v1/projects/<id>/cover \ -X POST \ -H "Authorization: Bearer sk_..."
{ "id": "...", "coverUrl": "https://...", "name": "Nike Campaign" }curl https://useinmedia.com/api/v1/projects/<id>/cover \ -X DELETE \ -H "Authorization: Bearer sk_..."
204 No Content
curl https://useinmedia.com/api/v1/projects/<id> \ -X DELETE \ -H "Authorization: Bearer sk_..."
204 No Content
Brand Kits
Sla merkkleuren, lettertypen en logo's op. Het Starter-abonnement is beperkt tot 1 Brand Kit.
curl https://useinmedia.com/api/v1/brandkits \ -H "Authorization: Bearer sk_..."
[
{
"id": "k1l2m3n4-...",
"name": "Main Brand",
"colorsJson": "{\"primary\":\"#00f2ff\",\"secondary\":\"#020408\"}",
"fontsJson": "{\"heading\":\"Plus Jakarta Sans\",\"body\":\"Inter\"}",
"logoUrl": "https://..."
}
]| Naam | Type | Obrigatório | Descriçã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 |
{
"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 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" }'
{ "id": "k1l2m3n4-...", "name": "Main Brand", ... }| Naam | Type | Obrigatório | Descriçã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 |
{ "colors": { "primary": "#ff5733" } }curl https://useinmedia.com/api/v1/brandkits/<id> \
-X PUT \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{ "colors": { "primary": "#ff5733" } }'
{ "id": "...", "name": "Main Brand", ... }curl https://useinmedia.com/api/v1/brandkits/<id> \ -H "Authorization: Bearer sk_..."
{
"id": "k1l2m3n4-...",
"name": "Main Brand",
"colorsJson": "{\"primary\":\"#00f2ff\",\"secondary\":\"#020408\"}",
"fontsJson": "{\"heading\":\"Plus Jakarta Sans\",\"body\":\"Inter\"}",
"logoUrl": "https://..."
}curl https://useinmedia.com/api/v1/brandkits/<id> \ -X DELETE \ -H "Authorization: Bearer sk_..."
204 No Content
Plannen
Automatiseer regelmatige inhoudsgeneratie met cron-planningen. Vereist het Growth-abonnement.
curl https://useinmedia.com/api/v1/schedules \ -H "Authorization: Bearer sk_..."
[
{
"id": "s1s2s3s4-...",
"name": "Daily Instagram Post",
"cronExpression": "0 9 * * *",
"isActive": true,
"promptTemplate": "Generate a motivational post for today.",
"nextRunAt": "2026-04-15T09:00:00Z"
}
]| Naam | Type | Obrigatório | Descriçã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 |
{
"name": "Daily Instagram Post",
"cronExpression": "0 9 * * *",
"promptTemplate": "Generate a motivational post for today.",
"projectId": "e5f6g7h8-...",
"brandKitId": "k1l2m3n4-..."
}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-..." }'
{
"id": "s1s2s3s4-...",
"name": "Daily Instagram Post",
"cronExpression": "0 9 * * *",
"isActive": true,
"nextRunAt": "2026-04-15T09:00:00Z"
}| Naam | Type | Obrigatório | Descriçã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 |
{ "isActive": false }curl https://useinmedia.com/api/v1/schedules/<id> \
-X PUT \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{ "isActive": false }'
{ "id": "...", "isActive": false, ... }curl https://useinmedia.com/api/v1/schedules/<id> \ -H "Authorization: Bearer sk_..."
{
"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"
}curl https://useinmedia.com/api/v1/schedules/<id> \ -X DELETE \ -H "Authorization: Bearer sk_..."
204 No Content
Webhooks
Ontvang real-time HTTP-meldingen wanneer gebeurtenissen plaatsvinden in uw workspace. Vereist het Growth-abonnement.
curl https://useinmedia.com/api/v1/webhooks \ -H "Authorization: Bearer sk_..."
[
{
"id": "w1w2w3w4-...",
"url": "https://yourapp.com/hooks/inmedia",
"events": "post.published,post.failed",
"isActive": true,
"lastTriggeredAt": "2026-04-14T10:00:00Z"
}
]| Naam | Type | Obrigatório | Descriçã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 |
{
"url": "https://yourapp.com/hooks/inmedia",
"events": "post.published,post.failed",
"secret": "my-webhook-secret"
}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" }'
{
"id": "w1w2w3w4-...",
"url": "https://yourapp.com/hooks/inmedia",
"events": "post.published,post.failed",
"isActive": true,
"createdAt": "2026-04-14T12:00:00Z"
}| Naam | Type | Obrigatório | Descrição |
|---|---|---|---|
| url | string | optional | Nieuwe URL van het eindpunt |
| events | string | optional | Nieuwe lijst met gebeurtenissen |
| isActive | boolean | optional | Inschakelen of uitschakelen |
{ "isActive": false }curl https://useinmedia.com/api/v1/webhooks/<id> \
-X PUT \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{ "isActive": false }'
{ "id": "...", "isActive": false, ... }curl https://useinmedia.com/api/v1/webhooks/<id> \ -X DELETE \ -H "Authorization: Bearer sk_..."
204 No Content
Video
Poll video-generatiejobs en haal vooraf ondertekende URLs op. Video-generatie wordt geïnitieerd vanuit de dashboard-editor.
curl https://useinmedia.com/api/v1/video/jobs/<jobId> \ -H "Authorization: Bearer sk_..."
{
"status": "done",
"postId": "e5f6g7h8-...",
"videoUrl": "https://presigned-s3-url...",
"message": "Video generated successfully!",
"error": null
}curl https://useinmedia.com/api/v1/video/presign/<postId> \ -H "Authorization: Bearer sk_..."
{ "url": "https://presigned-s3-url..." }Gebruik
Controleer uw abonnementquotum en generatie-activiteit.
| Naam | Type | Obrigatório | Descrição |
|---|---|---|---|
| page | integer | optional | Paginanummer (standaard: 1) |
| pageSize | integer | optional | Items per pagina (standaard: 50) |
curl https://useinmedia.com/api/v1/usage/activity \ -H "Authorization: Bearer sk_..."
{
"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.
curl https://useinmedia.com/api/v1/api-keys \ -H "Authorization: Bearer sk_..."
[
{
"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"
}
]| Naam | Type | Obrigatório | Descrição |
|---|---|---|---|
| name | string | required | Beschrijvende naam voor de sleutel |
| expiresAt | datetime | optional | Optionele verloopdatum (ISO 8601) |
{ "name": "Production key" }curl https://useinmedia.com/api/v1/api-keys \
-X POST \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{ "name": "Production key" }'
{
"id": "key-uuid-...",
"key": "sk_aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890abcd",
"prefix": "sk_aBcDe",
"name": "Production key"
}curl https://useinmedia.com/api/v1/api-keys/<id> \ -X DELETE \ -H "Authorization: Bearer sk_..."
204 No Content
curl https://useinmedia.com/api/v1/api-keys/<id>/regenerate \ -X POST \ -H "Authorization: Bearer sk_..."
{ "id": "...", "key": "sk_NEW...", "prefix": "sk_NEW" }