Login
Features Video AI Pricing Compare Blog Start creating free
DEVELOPER DOCUMENTATION

Referência da API

Full reference for the InMedia REST API. All endpoints require authentication via API key.

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

Headers obrigatórios

Authorization: Bearer sk_aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890abcd
Content-Type: application/json

The workspace is determined automatically from the API key. No X-Workspace-Id header needed. The key is only shown once at creation time; store it securely.

Quick example. Create a post

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

Error codes

CodeMeaning
400Requisição inválida. Parâmetros incorretos
401Unauthorized. Missing or invalid API key
403Forbidden. Resource not available on your plan
404Not Found. Resource does not exist
429Rate limit excedido. Reduza a frequência

Webhook events

Pass a comma-separated list of event names to the events field when creating a webhook.

post.generated
Triggered when the AI finishes generating a post
post.published
Triggered when a post is successfully published
post.scheduled
Triggered when a post is scheduled for future publication
post.failed
Triggered when the generation or publication of a post fails
video.completed
Triggered when a video rendering job completes
video.failed
Triggered when a video rendering job fails

Formato do payload

Every webhook delivery is a POST request with the following 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

If you provide a secret when creating a webhook, InMedia will sign every delivery with HMAC-SHA256. Verify the signature to ensure the request came from InMedia.

Signature header

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

The value is the HMAC-SHA256 hex digest of the raw request body using your webhook secret as the key.

Signature verification

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

Create and manage posts. Call POST /{id}/generate after creating a post to produce AI content.

GET /api/v1/posts List all posts
Parâmetros de Query
NameTypeObrigatórioDescrição
status string optional Filter by status: draft | scheduled | published | failed
page integer optional Page number (default: 1)
pageSize integer optional Items per page, max 100 (default: 20)
cURL
curl https://useinmedia.com/api/v1/posts \
  -H "Authorization: Bearer sk_..."
Response
[
  {
    "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 Create a post
Parâmetros do Body
NameTypeObrigatórioDescrição
title string required Título do post (máx 200 chars)
prompt string required Prompt de geração (máx 5000 chars)
projectId guid required Project to associate the post with
brandKitId guid optional Brand Kit to apply to generation
Body da requisição
{
  "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-..." }'
Response
{
  "id": "3f7a1b2c-...",
  "title": "Air Jordan launch",
  "status": "draft",
  "imageUrl": "https://...",
  "hasVideo": false,
  "createdAt": "2026-04-14T12:00:00Z"
}
GET /api/v1/posts/ {id} Retrieve post by ID
cURL
curl https://useinmedia.com/api/v1/posts/<id> \
  -H "Authorization: Bearer sk_..."
Response
{
  "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} List posts from a project
cURL
curl https://useinmedia.com/api/v1/posts/project/<projectId> \
  -H "Authorization: Bearer sk_..."
Response
[ { "id": "...", "title": "..." } ]
PUT /api/v1/posts/ {id} Update a post
Parâmetros do Body
NameTypeObrigatórioDescrição
title string optional Novo título (máx 200 chars)
prompt string optional Novo prompt (máx 5000 chars)
status string optional draft | scheduled | published | failed
scheduledAt datetime optional Scheduled date/time ISO 8601
brandKitId guid optional Brand Kit to apply
Body da requisição
{ "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" }'
Response
{
  "id": "3f7a1b2c-...",
  "title": "Updated title",
  "status": "draft",
  "updatedAt": "2026-04-14T13:00:00Z"
}
DELETE /api/v1/posts/ {id} Deletar um post
cURL
curl https://useinmedia.com/api/v1/posts/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Response
204 No Content
POST /api/v1/posts/ {id} /generate Generate (or regenerate) AI content for a post
Parâmetros do Body
NameTypeObrigatórioDescrição
prompt string optional New prompt; omit to regenerate with the existing prompt
format string optional Proporção: 1:1 | 9:16 | 16:9 (padrão: 1:1)
Body da requisição
{ "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" }'
Response
{
  "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 Render current version of post as image (PNG/JPEG)
cURL
curl https://useinmedia.com/api/v1/posts/<id>/render \
  -X POST \
  -H "Authorization: Bearer sk_..."
Response
{ "id": "...", "imageUrl": "https://...", "status": "draft" }
POST /api/v1/posts/ {id} /publish Mark a post as published
cURL
curl https://useinmedia.com/api/v1/posts/<id>/publish \
  -X POST \
  -H "Authorization: Bearer sk_..."
Response
{ "id": "...", "status": "published", "publishedAt": "2026-04-14T15:30:00Z" }
POST /api/v1/posts/ {id} /schedule Schedule a post for future publication
Parâmetros do Body
NameTypeObrigatórioDescrição
scheduledAt datetime required Publication date/time ISO 8601 (UTC)
Body da requisição
{ "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" }'
Response
{ "id": "...", "status": "scheduled", "scheduledAt": "2026-04-15T09:00:00Z" }
POST /api/v1/posts/ {id} /publish-social Publish (or schedule) a post on connected social networks
Parâmetros do Body
NameTypeObrigatórioDescrição
connectionIds guid[] required List of social connection IDs to publish
scheduledAt datetime optional If provided, schedules instead of publishing immediately
Body da requisição
{
  "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 }'
Response
[
  {
    "connectionId": "conn-uuid-1",
    "platform": "Instagram",
    "status": "Published",
    "externalPostId": "ext-123",
    "errorMessage": null
  }
]
GET /api/v1/posts/ {id} /publish-targets Query social publishing destinations and status of a post
cURL
curl https://useinmedia.com/api/v1/posts/<id>/publish-targets \
  -H "Authorization: Bearer sk_..."
Response
[
  {
    "connectionId": "conn-uuid-1",
    "platform": "Instagram",
    "status": "Published",
    "externalPostId": "ext-123",
    "errorMessage": null
  }
]
GET /api/v1/posts/ {id} /download Download post image as file
Parâmetros de Query
NameTypeObrigatórioDescrição
format string optional png (padrão) ou jpg
cURL
curl https://useinmedia.com/api/v1/posts/<id>/download \
  -H "Authorization: Bearer sk_..."
Response
Binary file (image/png or image/jpeg)
GET /api/v1/posts/ {id} /versions Listar versões salvas de um post
cURL
curl https://useinmedia.com/api/v1/posts/<id>/versions \
  -H "Authorization: Bearer sk_..."
Response
[
  {
    "id": "ver-uuid-...",
    "versionNumber": 3,
    "label": "Dark theme variant",
    "createdAt": "2026-04-14T12:00:00Z"
  }
]
POST /api/v1/posts/ {id} /versions/ {versionId} /restore Restore a post to a previous version
cURL
curl https://useinmedia.com/api/v1/posts/<id>/versions/<versionId>/restore \
  -X POST \
  -H "Authorization: Bearer sk_..."
Response
{ "id": "...", "status": "draft", "imageUrl": "https://...", "updatedAt": "2026-04-14T13:00:00Z" }

Projects

Organize posts under projects. Starter plan is limited to 3 active projects.

GET /api/v1/projects List projects
Parâmetros de Query
NameTypeObrigatórioDescrição
status string optional Filter: active | archived
cURL
curl https://useinmedia.com/api/v1/projects \
  -H "Authorization: Bearer sk_..."
Response
[
  {
    "id": "e5f6g7h8-...",
    "name": "Nike Campaign",
    "description": "Q2 2026 drop",
    "icon": "👟",
    "color": "#00f2ff",
    "status": "active",
    "createdAt": "2026-01-10T09:00:00Z"
  }
]
POST /api/v1/projects Create a project
Parâmetros do Body
NameTypeObrigatórioDescrição
name string required Project name
description string optional Optional description
icon string optional Emoji ícone
color string optional Cor hex ex: #00f2ff
Body da requisição
{
  "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" }'
Response
{
  "id": "e5f6g7h8-...",
  "name": "Nike Campaign",
  "status": "active",
  "createdAt": "2026-04-14T12:00:00Z"
}
PUT /api/v1/projects/ {id} Update a project
Parâmetros do Body
NameTypeObrigatórioDescrição
name string optional New name
description string optional New description
status string optional active | archived
Body da requisição
{ "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" }'
Response
{ "id": "...", "name": "Nike Campaign v2", "status": "archived" }
GET /api/v1/projects/ {id} Find a project by ID
cURL
curl https://useinmedia.com/api/v1/projects/<id> \
  -H "Authorization: Bearer sk_..."
Response
{
  "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 cover image to a project (multipart/form-data)
Parâmetros do Body
NameTypeObrigatórioDescrição
file file required JPEG, PNG ou WebP. Máx 10 MB
cURL
curl https://useinmedia.com/api/v1/projects/<id>/cover \
  -X POST \
  -H "Authorization: Bearer sk_..."
Response
{ "id": "...", "coverUrl": "https://...", "name": "Nike Campaign" }
DELETE /api/v1/projects/ {id} /cover Remove the cover image from a project
cURL
curl https://useinmedia.com/api/v1/projects/<id>/cover \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Response
204 No Content
DELETE /api/v1/projects/ {id} Delete a project
cURL
curl https://useinmedia.com/api/v1/projects/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Response
204 No Content

Brand Kits

Store brand colors, fonts and logos. Starter plan is limited to 1 Brand Kit.

GET /api/v1/brandkits List Brand Kits
cURL
curl https://useinmedia.com/api/v1/brandkits \
  -H "Authorization: Bearer sk_..."
Response
[
  {
    "id": "k1l2m3n4-...",
    "name": "Main Brand",
    "colorsJson": "{\"primary\":\"#00f2ff\",\"secondary\":\"#020408\"}",
    "fontsJson": "{\"heading\":\"Plus Jakarta Sans\",\"body\":\"Inter\"}",
    "logoUrl": "https://..."
  }
]
POST /api/v1/brandkits Create a Brand Kit
Parâmetros do Body
NameTypeObrigatórioDescrição
name string required Brand Kit name
colors.primary string optional Primary color hex
colors.secondary string optional Secondary color hex
colors.accent string optional Accent color hex
colors.neutral string optional Neutral color hex
fonts.heading string optional Title font
fonts.body string optional Body font
logoUrl string optional Public URL of logo image
Body da requisição
{
  "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" }'
Response
{ "id": "k1l2m3n4-...", "name": "Main Brand", ... }
PUT /api/v1/brandkits/ {id} Update a Brand Kit
Parâmetros do Body
NameTypeObrigatórioDescrição
name string optional New name
colors object optional Colors to update (same format as create)
fonts object optional Fonts to update
Body da requisição
{ "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" } }'
Response
{ "id": "...", "name": "Main Brand", ... }
GET /api/v1/brandkits/ {id} Find a Brand Kit by ID
cURL
curl https://useinmedia.com/api/v1/brandkits/<id> \
  -H "Authorization: Bearer sk_..."
Response
{
  "id": "k1l2m3n4-...",
  "name": "Main Brand",
  "colorsJson": "{\"primary\":\"#00f2ff\",\"secondary\":\"#020408\"}",
  "fontsJson": "{\"heading\":\"Plus Jakarta Sans\",\"body\":\"Inter\"}",
  "logoUrl": "https://..."
}
DELETE /api/v1/brandkits/ {id} Delete a Brand Kit
cURL
curl https://useinmedia.com/api/v1/brandkits/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Response
204 No Content

Schedules

Automate recurring content generation with cron schedules. Requires Growth plan.

Requires Growth+ plan
GET /api/v1/schedules List schedules
cURL
curl https://useinmedia.com/api/v1/schedules \
  -H "Authorization: Bearer sk_..."
Response
[
  {
    "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 Create a schedule Growth+
Parâmetros do Body
NameTypeObrigatórioDescrição
name string required Schedule name
cronExpression string required 5-field cron expression e.g. "0 9 * * 1"
promptTemplate string optional Prompt used on each run (max 5000 chars)
projectId guid optional Project of generated posts
brandKitId guid optional Brand Kit to apply
Body da requisição
{
  "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-..." }'
Response
{
  "id": "s1s2s3s4-...",
  "name": "Daily Instagram Post",
  "cronExpression": "0 9 * * *",
  "isActive": true,
  "nextRunAt": "2026-04-15T09:00:00Z"
}
PUT /api/v1/schedules/ {id} Update a schedule
Parâmetros do Body
NameTypeObrigatórioDescrição
name string optional New name
cronExpression string optional New cron expression
isActive boolean optional Enable or disable the schedule
promptTemplate string optional New prompt template
Body da requisição
{ "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 }'
Response
{ "id": "...", "isActive": false, ... }
GET /api/v1/schedules/ {id} Find a schedule by ID
cURL
curl https://useinmedia.com/api/v1/schedules/<id> \
  -H "Authorization: Bearer sk_..."
Response
{
  "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} Delete a schedule
cURL
curl https://useinmedia.com/api/v1/schedules/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Response
204 No Content

Webhooks

Receive real-time HTTP notifications when events occur in your workspace. Requires Growth plan.

Requires Growth+ plan
GET /api/v1/webhooks List webhooks
cURL
curl https://useinmedia.com/api/v1/webhooks \
  -H "Authorization: Bearer sk_..."
Response
[
  {
    "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 Register a webhook Growth+
Parâmetros do Body
NameTypeObrigatórioDescrição
url string required HTTPS endpoint to receive events
events string required Event names separated by commas (see Events section)
secret string optional Optional secret for HMAC-SHA256 signature verification
Body da requisição
{
  "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" }'
Response
{
  "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} Update a webhook
Parâmetros do Body
NameTypeObrigatórioDescrição
url string optional New endpoint URL
events string optional New list of events
isActive boolean optional Enable or disable
Body da requisição
{ "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 }'
Response
{ "id": "...", "isActive": false, ... }
DELETE /api/v1/webhooks/ {id} Deletar um webhook
cURL
curl https://useinmedia.com/api/v1/webhooks/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Response
204 No Content

Video

Poll video generation jobs and retrieve presigned URLs. Video generation is initiated from the dashboard editor.

Requires Growth+ plan
GET /api/v1/video/jobs/ {jobId} Check status of a video generation job Growth+
cURL
curl https://useinmedia.com/api/v1/video/jobs/<jobId> \
  -H "Authorization: Bearer sk_..."
Response
{
  "status": "done",
  "postId": "e5f6g7h8-...",
  "videoUrl": "https://presigned-s3-url...",
  "message": "Video generated successfully!",
  "error": null
}
GET /api/v1/video/presign/ {postId} Get updated signed URL for a post's video Growth+
cURL
curl https://useinmedia.com/api/v1/video/presign/<postId> \
  -H "Authorization: Bearer sk_..."
Response
{ "url": "https://presigned-s3-url..." }

Usage

Check your plan quota and generation activity.

GET /api/v1/usage/activity Check generation activities
Parâmetros de Query
NameTypeObrigatórioDescrição
page integer optional Page number (default: 1)
pageSize integer optional Items per page (default: 50)
cURL
curl https://useinmedia.com/api/v1/usage/activity \
  -H "Authorization: Bearer sk_..."
Response
{
  "activity": [
    {
      "id": "t1t2t3t4-...",
      "type": "PostGeneration",
      "typeLabel": "Content generation",
      "description": "Air Jordan launch",
      "createdAt": "2026-04-14T12:00:00Z"
    }
  ]
}

API Keys

Create and manage programmatic API keys. Requires Growth plan.

Requires Growth+ plan
GET /api/v1/api-keys List API keys
cURL
curl https://useinmedia.com/api/v1/api-keys \
  -H "Authorization: Bearer sk_..."
Response
[
  {
    "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 Create an API key Growth+
Parâmetros do Body
NameTypeObrigatórioDescrição
name string required Descriptive name for the key
expiresAt datetime optional Optional expiration (ISO 8601)
Body da requisição
{ "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" }'
Response
{
  "id": "key-uuid-...",
  "key": "sk_aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890abcd",
  "prefix": "sk_aBcDe",
  "name": "Production key"
}
DELETE /api/v1/api-keys/ {id} Revoke an API key
cURL
curl https://useinmedia.com/api/v1/api-keys/<id> \
  -X DELETE \
  -H "Authorization: Bearer sk_..."
Response
204 No Content
POST /api/v1/api-keys/ {id} /regenerate Regenerate an API key
cURL
curl https://useinmedia.com/api/v1/api-keys/<id>/regenerate \
  -X POST \
  -H "Authorization: Bearer sk_..."
Response
{ "id": "...", "key": "sk_NEW...", "prefix": "sk_NEW" }