> ## Documentation Index
> Fetch the complete documentation index at: https://docs.so-me.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Social-Media-API Quickstart

> Erstelle einen API-Schlüssel und plane deinen ersten Beitrag für Instagram, LinkedIn, X, TikTok und mehr mit einem einzigen REST-Aufruf. Funktionierende curl-Beispiele für Beiträge und Medien.

## Voraussetzungen

Bevor du loslegst, stelle sicher, dass du Folgendes hast:

1. Ein Social-media-studio-Konto mit mindestens einem verbundenen Social-Media-Konto
2. Einen API-Schlüssel (siehe [Authentifizierung](/de/authentication.md))

## Basis-URL

Alle API-Anfragen gehen an:

```
https://api.so-me.studio/v1
```

## Beitrag erstellen

Sende eine `POST`-Anfrage, um einen neuen Beitrag zu erstellen:

```bash theme={null}
curl -X POST https://api.so-me.studio/v1/posts \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Hello from the API!",
    "socialMedia": "TWITTER",
    "postType": "TEXT"
  }'
```

> [!NOTE]
>
> `socialMedia` akzeptiert jedes der 16 Veröffentlichungsziele (etwa `TWITTER`,
> `LINKEDIN`, `INSTAGRAM`, `FACEBOOK`, `TIKTOK`, `YOUTUBE`, `THREADS`,
> `PINTEREST`, `BLUESKY` und weitere) – nicht nur die wenigen in diesen
> Beispielen. `WHATSAPP` und `TELEGRAM` sind reine Messaging-Kanäle, auf denen
> du nicht posten kannst. Die vollständige Liste der unterstützten Plattformen
> findest du unter [Konten verbinden](/de/get-started/connecting-accounts.md).

```json Antwort theme={null}
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "text": "Hello from the API!",
  "socialMedia": "TWITTER",
  "postType": "TEXT",
  "postStatus": "SCHEDULED",
  "createdAt": "2025-01-15T09:00:00.000Z"
}
```

## Beitrag planen

Um einen Beitrag für die Zukunft zu planen, gib beim Erstellen `scheduledAt` an:

```bash theme={null}
curl -X POST https://api.so-me.studio/v1/posts \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "Scheduled post!",
    "socialMedia": "LINKEDIN",
    "postType": "TEXT",
    "scheduledAt": "2025-02-01T12:00:00Z"
  }'
```

Oder plane einen bestehenden Beitrag:

```bash theme={null}
curl -X POST https://api.so-me.studio/v1/posts/{id}/schedule \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "scheduledAt": "2025-02-01T12:00:00Z"
  }'
```

## Beiträge auflisten

Rufe die Beiträge deines Workspace ab, optional gefiltert. Der Filter `status`
entspricht dem Feld `postStatus` in den Antworten, und `socialMedia` filtert
nach Plattform:

```bash theme={null}
curl "https://api.so-me.studio/v1/posts?status=SCHEDULED&socialMedia=TWITTER&limit=10" \
  -H "X-API-Key: YOUR_API_KEY"
```

## Upload media

Für Bild- und Videobeiträge holst du zuerst eine vorsignierte Upload-URL:

```bash theme={null}
curl -X POST https://api.so-me.studio/v1/posts/presign-media \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "postType": "IMAGE",
    "socialMedia": "INSTAGRAM",
    "files": [{
      "filename": "photo.jpg",
      "mimetype": "image/jpeg",
      "size": 1024000
    }]
  }'
```

Lade deine Datei dann per HTTP `PUT` an die zurückgegebene `uploadUrl` hoch.
Sende dabei einen `Content-Type`-Header, der dem von dir angegebenen `mimetype`
entspricht:

```bash theme={null}
curl -X PUT "UPLOAD_URL_FROM_THE_RESPONSE" \
  -H "Content-Type: image/jpeg" \
  --data-binary @photo.jpg
```

> [!WARNING]
>
> Die Upload-URL ist mit dem angegebenen `mimetype` signiert. Ein `PUT` ohne
> `Content-Type`-Header (zum Beispiel `curl -T` oder Python
> `requests.put(url, data=f)`) oder mit einem anderen Wert schlägt mit
> `403 SignatureDoesNotMatch` fehl.

Verwende anschließend `s3Prefix` und `fileSrc` in deiner Anfrage zum Erstellen des Beitrags.

## Nächste Schritte

> **[API-Referenz](/de/api-reference)**
>
> Vollständige Endpunkt-Referenz mit interaktivem Playground

> **[MCP-Server](/de/mcp/overview.md)**
>
> Verbinde KI-Agenten über das Model Context Protocol


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.