API version 1

Official Social Marketing Suite API

Use the API to control campaigns from your own systems.

A company reads its figures, reports results and maintains its offers. The operator controls the campaigns of all companies.

The API speaks JSON over HTTPS. All routes live under /api/v1.

Base address: https://social-marketingsuite.com/api/v1

Access and keys

Every call carries a key in the Authorization header. Use the key on a server only, never in a browser.

Company key

It starts with smk_ and belongs to one company. The operator finds it in the operator admin under the customer. It covers overview, events and offers.

Operator key

It belongs to the operator only and controls all companies. It covers all routes under /operator. Ten wrong keys block the address for ten minutes. The status is then 429.

Example header:

Authorization: Bearer smk_dein_schluessel

Routes for companies

These routes need the company key. The tracking pixel and the description need no key.

GET/overview

Returns key figures, accounts and the next posts of your own company.

Request

curl "https://social-marketingsuite.com/api/v1/overview" \
  -H "Authorization: Bearer $SMK_KEY"

Response (Status 200)

{
  "client": { "name": "Study Online", "slug": "studyonline-now", "domain": "studyonline.now", "status": "active", "languages": ["de", "en"] },
  "generated_at": "2026-11-18T09:00:00.000Z",
  "kpis": { "posts_total": 42, "posts_by_status": { "published": 30, "review": 3 }, "channels_total": 4, "channels_by_status": { "connected": 4 }, "review_pending": 3 },
  "channels": [ { "id": 7, "name": "Study Online", "platform": "instagram", "language": "de", "handle": "studyonline", "status": "connected", "auto_publish": true } ],
  "next_posts": [ { "id": 123, "name": "Stipendien im Überblick", "channel": "Study Online", "platform": "instagram", "language": "de", "format": "reel", "status": "scheduled", "scheduled_at": "2026-11-20T09:00:00.000Z", "permalink": null } ],
  "recent_published": [],
  "last_log": [ { "action": "post_published", "level": "info", "entity": "publisher", "created_at": "2026-11-17T08:00:00.000Z" } ],
  "suite_url": "https://social-marketingsuite.com/app"
}

POST/events

Reports a result from your website, such as a lead or a purchase.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/events" \
  -H "Authorization: Bearer $SMK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type":"lead","code":"Ab3xYz1","value":49.9,"source":"kontaktformular"}'

Response (Status 201)

{ "ok": true, "id": 981, "post_id": 123, "link_id": 55 }

GET/events/pixel.gif

Counts a result through an image. This helps sites without their own server.

Request

curl "https://social-marketingsuite.com/api/v1/events/pixel.gif?k=smp_18_abc123&type=lead&code=Ab3xYz1"

Response (Status 200)

HTTP 200, Content-Type: image/gif (1x1 Pixel, auch bei Fehlern)

GET/offers

Lists all offers of the company.

Request

curl "https://social-marketingsuite.com/api/v1/offers" \
  -H "Authorization: Bearer $SMK_KEY"

Response (Status 200)

{
  "client": { "name": "Study Online", "slug": "studyonline-now" },
  "count": 1,
  "offers": [ { "id": 31, "external_ref": "P-100", "name": "MBA Fernstudium", "kind": "programm", "parent_id": null, "parent_ref": null, "description": "Berufsbegleitend in 24 Monaten.", "highlights": ["Start jederzeit"], "url": "https://studyonline.now/mba", "price": "4900 EUR", "weight": 3, "active": true, "source": "api" } ]
}

POST/offers

Creates or updates offers. The match runs over external_ref.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/offers" \
  -H "Authorization: Bearer $SMK_KEY" \
  -H "Content-Type: application/json" \
  -d '{"offers":[{"external_ref":"P-100","name":"MBA Fernstudium","kind":"programm","price":"4900 EUR","active":true}]}'

Response (Status 200)

{ "ok": true, "created": 1, "updated": 0, "skipped": 0, "errors": [], "warnings": [] }

GET/openapi.json

Returns the machine-readable description of this API. No key needed.

Request

curl "https://social-marketingsuite.com/api/v1/openapi.json"

Response (Status 200)

{ "openapi": "3.1.0", "info": { "title": "Social Marketing Suite API", "version": "1" }, "paths": { "...": "..." } }

Routes for the operator

These routes need the operator key. In the path, {slug} stands for the company. The path uses {id} for the row.

GET/operator/stand

Shows the status of all companies at a glance. A failed company appears with an error field.

Request

curl "https://social-marketingsuite.com/api/v1/operator/stand" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{
  "generated_at": "2026-11-18T09:00:00.000Z",
  "firmen": [
    { "slug": "studyonline-now", "name": "Study Online", "domain": "studyonline.now", "status": "active", "beitraege_je_status": { "published": 30, "review": 3 }, "freigabe_offen": 3, "naechster_beitrag": { "id": 123, "name": "Stipendien im Überblick", "scheduled_at": "2026-11-20T09:00:00.000Z", "platform": "instagram" }, "fehler_offen": 0, "serien_aktiv": 2, "serien_gesamt": 3, "tagesplan_aktiv": true, "notaus": false, "kommentare_offen": 4, "ideen_offen": 6 },
    { "slug": "beispiel-de", "name": "Beispiel", "domain": "beispiel.de", "status": null, "beitraege_je_status": {}, "freigabe_offen": 0, "naechster_beitrag": null, "fehler_offen": 0, "serien_aktiv": 0, "serien_gesamt": 0, "tagesplan_aktiv": false, "notaus": false, "kommentare_offen": 0, "ideen_offen": 0, "fehler": "Die Daten dieser Firma ließen sich nicht laden." }
  ]
}

GET/operator/firmen

Lists all companies with their number of accounts and posts.

Request

curl "https://social-marketingsuite.com/api/v1/operator/firmen" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "generated_at": "2026-11-18T09:00:00.000Z", "count": 1, "firmen": [ { "id": 18, "name": "Study Online", "slug": "studyonline-now", "domain": "studyonline.now", "website_url": "https://studyonline.now", "status": "active", "languages_active": ["de", "en"], "channels": 4, "posts": 42 } ] }

POST/operator/firmen

Creates a new company. The slug comes from the domain.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen" \
  -H "Authorization: Bearer $OPERATOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Beispiel GmbH","domain":"beispiel.de","languages_active":["de"]}'

Response (Status 201)

{ "id": 19, "slug": "beispiel-de" }

GET/operator/firmen/{slug}

Returns the overview of a company and the measurement of the last days.

Request

curl "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now?tage=28" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "id": 18, "client": { "name": "Study Online", "slug": "studyonline-now" }, "kpis": { "posts_total": 42 }, "messung": { "tage": 28, "posts_veroeffentlicht": 12, "klicks_tracking_links": { "summe": 340, "links": 12, "hinweis": "Zähler seit Anlage der Links, nicht nur im Zeitraum" }, "ereignisse": { "lead": 9 }, "plattform_kennzahlen": { "reach": 15000, "impressions": 21000, "interactions": 900, "clicks": 310, "posts_mit_kennzahlen": 10 }, "channels": [] } }

PATCH/operator/firmen/{slug}

Changes background notes, industry, website or languages of a company.

Request

curl -X PATCH "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now" \
  -H "Authorization: Bearer $OPERATOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"notes":"Zielgruppe: Berufstätige ab 30.","languages_active":["de","en"]}'

Response (Status 200)

{ "ok": true, "id": 18, "slug": "studyonline-now", "updated": ["notes", "languages_active"] }

GET/operator/firmen/{slug}/beitraege

Lists the posts of a company, sorted by date. Filters: status, von, bis, limit.

Request

curl "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/beitraege?status=review&limit=20" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "beitraege": [ { "id": 123, "name": "Stipendien im Überblick", "status": "review", "erlaubte_status": ["approved", "skipped"], "channel": { "id": 7, "name": "Study Online", "platform": "instagram", "handle": "studyonline" }, "language": "de", "format": "reel", "scheduled_at": "2026-11-20T09:00:00.000Z", "published_at": null, "caption": "Fünf Wege zum Stipendium.", "hashtags": "#stipendium", "notes": "", "topic": null, "series": null, "asset_urls": [], "video_url": null, "permalink": null, "error": null, "kennzahlen": { "reach": null, "impressions": null, "likes": null, "comments": null, "shares": null, "saves": null, "clicks": null, "interactions": null } } ] }

POST/operator/firmen/{slug}/beitraege

Creates a post for an account and a date.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/beitraege" \
  -H "Authorization: Bearer $OPERATOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"channel_id":7,"scheduled_at":"2026-11-20T09:00:00+01:00","caption":"Neuer Kurs ab Januar."}'

Response (Status 201)

{ "ok": true, "beitrag": { "id": 124, "status": "planned", "scheduled_at": "2026-11-20T08:00:00.000Z", "...": "..." } }

GET/operator/firmen/{slug}/beitraege/{id}

Returns one post with its production log.

Request

curl "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/beitraege/123" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "beitrag": { "id": 123, "name": "Stipendien im Überblick", "status": "review", "production_log": "Video fertig.", "...": "..." } }

PATCH/operator/firmen/{slug}/beitraege/{id}

Changes caption, hashtags, notes, date or status of a post.

Request

curl -X PATCH "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/beitraege/123" \
  -H "Authorization: Bearer $OPERATOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"caption":"Fünf Wege zum Stipendium.","scheduled_at":"2026-11-21T09:00:00Z"}'

Response (Status 200)

{ "ok": true, "beitrag": { "id": 123, "status": "review", "...": "..." } }

POST/operator/firmen/{slug}/beitraege/{id}/freigeben

Approves a post in status review.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/beitraege/123/freigeben" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "ok": true, "beitrag": { "id": 123, "status": "approved", "...": "..." } }

POST/operator/firmen/{slug}/beitraege/{id}/ueberspringen

Skips a post in status review.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/beitraege/123/ueberspringen" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "ok": true, "beitrag": { "id": 123, "status": "skipped", "...": "..." } }

POST/operator/firmen/{slug}/brainstorming

Creates a new brainstorming session.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/brainstorming" \
  -H "Authorization: Bearer $OPERATOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"thema":"Frühjahrskampagne","input":"Fokus auf Berufstätige."}'

Response (Status 201)

{ "ok": true, "brainstorm": { "id": 9, "name": "Frühjahrskampagne", "status": "offen" } }

POST/operator/firmen/{slug}/brainstorming/{id}/ideen

Starts the idea round of a session. The AI takes up to 2.5 minutes.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/brainstorming/123/ideen" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "ok": true, "ideen": 8 }

GET/operator/firmen/{slug}/ideen

Lists ideas from brainstorming. Default: open proposals.

Request

curl "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/ideen?status=offen&limit=50" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "ideen": [ { "id": 5, "titel": "Stipendien-Serie", "beschreibung": "Jede Woche ein Stipendium.", "status": "vorschlag", "brainstorm": { "id": 9, "name": "Frühjahrskampagne" }, "thema": null } ] }

POST/operator/firmen/{slug}/ideen/{id}/annehmen

Accepts an idea and creates a campaign topic.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/ideen/123/annehmen" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "ok": true, "thema_id": 14, "idee": { "id": 5, "status": "angenommen", "...": "..." } }

POST/operator/firmen/{slug}/ideen/{id}/ablehnen

Rejects an idea. The reason needs at least 3 characters.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/ideen/123/ablehnen" \
  -H "Authorization: Bearer $OPERATOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"grund":"Passt nicht zur Zielgruppe."}'

Response (Status 200)

{ "ok": true, "idee": { "id": 5, "status": "abgelehnt", "...": "..." } }

GET/operator/firmen/{slug}/kommentare

Lists comments under published posts. Default: open ones.

Request

curl "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/kommentare?status=offen" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "kommentare": [ { "id": 77, "platform": "instagram", "autor": "anna", "text": "Gibt es Raten?", "entwurf": "", "status": "neu", "art": "frage", "fehler": null, "beitrag": { "id": 123, "name": "Stipendien im Überblick" }, "erstellt_at": "2026-11-18T07:30:00.000Z" } ] }

PATCH/operator/firmen/{slug}/kommentare/{id}

Saves a reply draft or closes a comment.

Request

curl -X PATCH "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/kommentare/123" \
  -H "Authorization: Bearer $OPERATOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"entwurf":"Ja, es gibt Ratenzahlung."}'

Response (Status 200)

{ "ok": true, "kommentar": { "id": 77, "status": "entwurf", "...": "..." } }

POST/operator/firmen/{slug}/kommentare/{id}/antwort

Sends a reply. It appears on the platform for everyone right away.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/kommentare/123/antwort" \
  -H "Authorization: Bearer $OPERATOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Ja, es gibt Ratenzahlung."}'

Response (Status 200)

{ "ok": true, "kommentar": { "id": 77, "status": "gesendet", "...": "..." } }

GET/operator/firmen/{slug}/einstellungen

Returns the settings of a company and the list of known keys.

Request

curl "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/einstellungen" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "einstellungen": { "require_approval": "true", "posts_frequency_per_week": "3" }, "bekannte": [ { "key": "require_approval", "label": "Freigabe nötig", "typ": "bool" } ] }

PATCH/operator/firmen/{slug}/einstellungen

Changes known settings. The suite checks everything before it writes.

Request

curl -X PATCH "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/einstellungen" \
  -H "Authorization: Bearer $OPERATOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"require_approval":true,"posts_frequency_per_week":4}'

Response (Status 200)

{ "ok": true, "geaendert": ["require_approval", "posts_frequency_per_week"], "einstellungen": { "require_approval": "true", "posts_frequency_per_week": "4" } }

GET/operator/firmen/{slug}/protokoll

Returns the latest log entries of a company without contents.

Request

curl "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/protokoll?limit=30" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "eintraege": [ { "action": "post_approved", "level": "info", "entity": "operator_api", "created_at": "2026-11-18T08:00:00.000Z" } ] }

GET/operator/firmen/{slug}/serien

Lists the series of a company with their schedule.

Request

curl "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/serien" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "serien": [ { "id": 3, "name": "Stipendium der Woche", "aktiv": true, "key": "stipendium", "thema": null, "stufe": "basis", "plattformen": ["instagram"], "sprachen": ["de"], "format": "reel", "zeitplan": { "mon": ["09:00"] }, "gewicht": 1, "wiederholsperre_tage": 30, "quelle": "manuell", "ziel_url": null, "angehalten_am": null, "angehalten_grund": null } ] }

PATCH/operator/firmen/{slug}/serien/{id}

Turns a series on or off.

Request

curl -X PATCH "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/serien/123" \
  -H "Authorization: Bearer $OPERATOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"aktiv":false}'

Response (Status 200)

{ "ok": true, "serie": { "id": 3, "aktiv": false, "...": "..." } }

POST/operator/firmen/{slug}/tagesplan

Creates the daily plan. The posts appear in a few minutes in the background.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/tagesplan" \
  -H "Authorization: Bearer $OPERATOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"datum":"2026-11-20"}'

Response (Status 200)

{ "ok": true, "datum": "2026-11-20", "auftrag_id": 412 }

POST/operator/firmen/{slug}/auftraege/jetzt

Runs the queue right away. It belongs to the whole server.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/auftraege/jetzt" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "ok": true, "erledigt": 5, "fehler": 0 }

POST/operator/firmen/{slug}/auftraege/{id}/wiederholen

Resets a failed job. It then runs again.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/auftraege/123/wiederholen" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "ok": true, "auftrag": { "id": 412, "status": "wartet" } }

GET/operator/firmen/{slug}/medien

Lists image and video jobs with status, files and costs.

Request

curl "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/medien?status=fertig&art=video&limit=20" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "medien": [ { "id": 88, "art": "video", "dienst": "videos", "status": "fertig", "vorlage": "bewegter-text", "formate": ["9x16"], "beitrag": { "id": 123, "name": "Stipendien im Überblick" }, "serie": { "id": 3, "name": "Stipendium der Woche" }, "dateien": ["https://videos.made-with.ai/files/abc/9x16.mp4"], "kosten": 0, "fehler": null, "erstellt_at": "2026-11-18T07:00:00.000Z", "fertig_at": "2026-11-18T07:02:10.000Z" } ] }

POST/operator/firmen/{slug}/medien

Orders an image or a video. The finished files report back on their own.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/medien" \
  -H "Authorization: Bearer $OPERATOR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"art":"video","vorlage":"bewegter-text","params":{"hook":"3 Stipendien für Berufstätige","items":[{"title":"Stipendium A","meta":"bis 5.000 Euro"}],"lang":"de"},"formate":["9x16"],"beitrag_id":123}'

Response (Status 201)

{ "ok": true, "medium": { "id": 89, "art": "video", "dienst": "videos", "status": "laeuft", "vorlage": "bewegter-text", "formate": ["9x16"], "beitrag": { "id": 123, "name": "Stipendien im Überblick" }, "serie": null, "dateien": [], "kosten": null, "fehler": null, "erstellt_at": null, "fertig_at": null } }

GET/operator/firmen/{slug}/medien/vorlagen

Lists the templates of the service with fields and formats.

Request

curl "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/medien/vorlagen?art=video" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "vorlagen": [ { "key": "bewegter-text", "name": "Aufhänger, dann 2 bis 5 Einträge", "felder": [ { "name": "hook", "typ": "string", "pflicht": true }, { "name": "items", "typ": "array", "pflicht": true } ], "formate": ["9x16", "4x5", "1x1", "16x9"] } ] }

GET/operator/firmen/{slug}/medien/nutzung

Shows jobs and costs per month in US dollars.

Request

curl "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/medien/nutzung" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 200)

{ "monate": [ { "monat": "2026-11", "auftraege": 14, "fehlgeschlagen": 1, "kosten": 0.42 }, { "monat": "2026-10", "auftraege": 6, "fehlgeschlagen": 0, "kosten": 0.1 } ] }

POST/operator/firmen/{slug}/medien/{id}/wiederholen

Sends a failed media job again. It gets a new row.

Request

curl -X POST "https://social-marketingsuite.com/api/v1/operator/firmen/studyonline-now/medien/123/wiederholen" \
  -H "Authorization: Bearer $OPERATOR_KEY"

Response (Status 201)

{ "ok": true, "medium": { "id": 90, "art": "video", "status": "laeuft", "vorlage": "bewegter-text", "...": "..." } }

Error codes and status codes

Errors come with a matching HTTP status. The body always has the shape { error, hint? }. The code in error is for programs. The hint explains it in one sentence.

StatusMeaning
400The input is invalid. The code in error names the field, for example scheduled_at_ungueltig.
401The key is missing or wrong. The code is invalid_api_key or invalid_operator_key.
404The company or row does not exist, or it belongs to another company.
409The status does not fit. The response names status and erlaubte_status.
413The call is too large. Offers: at most 1000 per call and 5 MB.
429Too many calls or too many wrong keys. The Retry-After header gives the wait time.
500Unexpected error. The details are in the server log.
502A service behind the API failed, for example the AI or the platform.
503The server has no key, no AI access or no media access.

Versions and stability

  • Version 1 stays stable. Every response carries the header X-API-Version: 1.
  • Changes in v1 are backward compatible. Existing fields and routes stay.
  • New things arrive as new fields. Read only the fields you need.
  • A breaking change arrives only as a new version under /api/v2.

Machine-readable description

The full OpenAPI 3.1 description is open to read. It suits clients and test tools.

Open openapi.json