# Creators | AudioDN Docs

> API-Endpunkte zum Erstellen, Aktualisieren, Auflisten und Löschen von Creators in AudioDN. Creators sind Unterkonten unter Ihrer Organisation zur Klassifizierung von Sammlungen und Tracks und zur Verfolgung der Nutzung pro Creator.

Source: https://audiodeliverynetwork.com/de/docs/api/creators/

---

# Creators

Ein Creator ist ein Unterkonto unter Ihrer Organisation und steht typischerweise für einen einzelnen Content-Beitragenden wie einen Künstler oder Podcaster. Creators dienen dazu, Sammlungen und Tracks zu klassifizieren, sie in einen dedizierten Speicherordner einzuordnen und die Nutzung granular zu verfolgen. Sobald ein Creator existiert, übergeben Sie seine `creator_id` beim Erstellen von Sammlungen, Tracks oder Upload-Sessions, um sie diesem Creator zuzuordnen.

Der `organization_index` ist Ihre eigene externe Kennung für den Creator (z. B. die Creator-ID in Ihrem System). Er ist beim Erstellen eines Creators erforderlich und kann später zur Auflösung des Creators verwendet werden, wenn Sie die AudioDN-`creator_id` nicht zur Hand haben.

GET `/v1/creator`

Gibt eine Liste von Creators für eine Organisation zurück

#### Parameter

| Name | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `limit` | number | Optional | Maximale Anzahl zurückzugebender Creators |
| `offset` | number | Optional | Anzahl zu überspringender Creators |

#### Beispielanfrage

    

```
curl -X GET "https://api.audiodelivery.net/v1/creator" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```
const response = await fetch('https://api.audiodelivery.net/v1/creator', {
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
  }
});

const data = await response.json();
```

```
import Foundation

func performRequest() async throws {
    var request = URLRequest(url: URL(string: "https://api.audiodelivery.net/v1/creator")!)
    request.httpMethod = "GET"
    request.setValue("Bearer YOUR_API_KEY", forHTTPHeaderField: "Authorization")
    let (data, _) = try await URLSession.shared.data(for: request)
    let json = try JSONSerialization.jsonObject(with: data) as! [String: Any]
    // use json
}
```

```
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import okhttp3.*

val client = OkHttpClient()

suspend fun performRequest(): String = withContext(Dispatchers.IO) {
    val request = Request.Builder()
        .url("https://api.audiodelivery.net/v1/creator")
        .addHeader("Authorization", "Bearer YOUR_API_KEY")
        .build()
    val response = client.newCall(request).execute()
    response.body?.string() ?: error("Empty response body")
}
```

```
import 'dart:convert';
import 'package:http/http.dart' as http;

Future<Map<String, dynamic>> performRequest() async {
  final response = await http.get(
    Uri.parse("https://api.audiodelivery.net/v1/creator"),
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
    },
  );
  if (response.statusCode < 200 || response.statusCode >= 300) {
    throw Exception('Request failed: ${response.statusCode}');
  }
  return jsonDecode(response.body) as Map<String, dynamic>;
}
```

#### Antwort

```
{
"ok": true,
"api_request_id": "uuid",
"count": 0,
"creators": [
  {
    "id": "uuid",
    "organization_id": "uuid",
    "folder_id": "uuid",
    "organization_index": "string",
    "metadata": {},
    "created_at": "string",
    "updated_at": "string"
  }
]
}
```

GET `/v1/creator/:creator_id`

Gibt Details zu einem bestimmten Creator zurück

#### Parameter

| Name | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `creator_id` | uuid | Erforderlich | Die ID des abzurufenden Creators (Pfadparameter) |

#### Antwort

```
{
"ok": true,
"api_request_id": "uuid",
"creator_id": "uuid",
"creator": {
  "id": "uuid",
  "organization_id": "uuid",
  "folder_id": "uuid",
  "organization_index": "string",
  "metadata": {},
  "created_at": "string",
  "updated_at": "string"
}
}
```

POST `/v1/creator`

Erstellt einen neuen Creator

#### Parameter

| Name | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `organization_index` | string | Erforderlich | Ihre externe Kennung für den Creator (die Kennung des Remote-Dienstes) |
| `metadata` | object | Optional | Organisations-Metadaten für den Creator |

#### Beispielanfrage

    

```
curl -X POST "https://api.audiodelivery.net/v1/creator" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "organization_index": "artist-123"
}'
```

```
const payload = {
  "organization_index": "artist-123"
};

const response = await fetch('https://api.audiodelivery.net/v1/creator', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify(payload)
});

const data = await response.json();
```

```
import Foundation

func performRequest() async throws {
    var request = URLRequest(url: URL(string: "https://api.audiodelivery.net/v1/creator")!)
    request.httpMethod = "POST"
    request.setValue("Bearer YOUR_API_KEY", forHTTPHeaderField: "Authorization")
    request.setValue("application/json", forHTTPHeaderField: "Content-Type")
    let bodyJSON = """
{
  "organization_index": "artist-123"
}
"""
    request.httpBody = bodyJSON.data(using: .utf8)
    let (data, _) = try await URLSession.shared.data(for: request)
    let json = try JSONSerialization.jsonObject(with: data) as! [String: Any]
    // use json
}
```

```
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import okhttp3.*
import okhttp3.MediaType.Companion.toMediaType
import okhttp3.RequestBody.Companion.toRequestBody

val client = OkHttpClient()

suspend fun performRequest(): String = withContext(Dispatchers.IO) {
    val body = """{
  "organization_index": "artist-123"
}""".toRequestBody("application/json".toMediaType())
    val request = Request.Builder()
        .url("https://api.audiodelivery.net/v1/creator")
        .post(body)
        .addHeader("Authorization", "Bearer YOUR_API_KEY")
        .addHeader("Content-Type", "application/json")
        .build()
    val response = client.newCall(request).execute()
    response.body?.string() ?: error("Empty response body")
}
```

```
import 'dart:convert';
import 'package:http/http.dart' as http;

Future<Map<String, dynamic>> performRequest() async {
  final response = await http.post(
    Uri.parse("https://api.audiodelivery.net/v1/creator"),
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: jsonEncode({
  "organization_index": "artist-123"
}),
  );
  if (response.statusCode < 200 || response.statusCode >= 300) {
    throw Exception('Request failed: ${response.statusCode}');
  }
  return jsonDecode(response.body) as Map<String, dynamic>;
}
```

#### Antwort

```
{
"ok": true,
"api_request_id": "uuid",
"creator_id": "uuid",
"creator": {
  "id": "uuid",
  "organization_id": "uuid",
  "folder_id": "uuid",
  "organization_index": "string",
  "metadata": {},
  "created_at": "string",
  "updated_at": "string"
}
}
```

Das Erstellen eines Creators provisioniert auch einen dedizierten Speicherordner und verknüpft ihn über `folder_id`. Sammlungen und Tracks, die mit dieser `creator_id` erstellt werden, werden im selben Ordner gespeichert.

PUT `/v1/creator/:creator_id`

Aktualisiert einen bestehenden Creator

#### Parameter

| Name | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `creator_id` | uuid | Erforderlich | Die ID des zu aktualisierenden Creators (Pfadparameter) |
| `organization_index` | string | Optional | Ihre externe Kennung für den Creator |
| `metadata` | object | Optional | Organisations-Metadaten für den Creator |

#### Antwort

```
{
"ok": true,
"api_request_id": "uuid",
"creator_id": "uuid",
"creator": {
  "id": "uuid",
  "organization_id": "uuid",
  "folder_id": "uuid",
  "organization_index": "string",
  "metadata": {},
  "created_at": "string",
  "updated_at": "string"
}
}
```

DELETE `/v1/creator/:creator_id`

Löscht einen Creator soft (nur wenn er keine ungelöschten Sammlungen oder Tracks hat)

#### Parameter

| Name | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `creator_id` | uuid | Erforderlich | Die ID des zu löschenden Creators (Pfadparameter) |

Creators kaskadieren nie. Wenn der Creator noch ungelöschte Sammlungen oder Tracks hat, wird die Anfrage mit `409` abgelehnt — löschen Sie diese zuerst. Wenn keine ungelöschten Kinder mehr vorhanden sind, wird der Speicherordner des Creators zusammen mit dem Creator soft-gelöscht.

#### Beispielanfrage

    

```
curl -X DELETE "https://api.audiodelivery.net/v1/creator/CREATOR_ID" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```
const response = await fetch('https://api.audiodelivery.net/v1/creator/CREATOR_ID', {
  method: 'DELETE',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
  }
});

const data = await response.json();
```

```
import Foundation

func performRequest() async throws {
    var request = URLRequest(url: URL(string: "https://api.audiodelivery.net/v1/creator/CREATOR_ID")!)
    request.httpMethod = "DELETE"
    request.setValue("Bearer YOUR_API_KEY", forHTTPHeaderField: "Authorization")
    let (data, _) = try await URLSession.shared.data(for: request)
    let json = try JSONSerialization.jsonObject(with: data) as! [String: Any]
    // use json
}
```

```
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.withContext
import okhttp3.*

val client = OkHttpClient()

suspend fun performRequest(): String = withContext(Dispatchers.IO) {
    val request = Request.Builder()
        .url("https://api.audiodelivery.net/v1/creator/CREATOR_ID")
        .delete()
        .addHeader("Authorization", "Bearer YOUR_API_KEY")
        .build()
    val response = client.newCall(request).execute()
    response.body?.string() ?: error("Empty response body")
}
```

```
import 'dart:convert';
import 'package:http/http.dart' as http;

Future<Map<String, dynamic>> performRequest() async {
  final response = await http.delete(
    Uri.parse("https://api.audiodelivery.net/v1/creator/CREATOR_ID"),
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
    },
  );
  if (response.statusCode < 200 || response.statusCode >= 300) {
    throw Exception('Request failed: ${response.statusCode}');
  }
  return jsonDecode(response.body) as Map<String, dynamic>;
}
```

#### Antwort

```
{
"ok": true,
"api_request_id": "uuid",
"creator_id": "uuid",
"deleted_creator": {
  "id": "uuid",
  "organization_id": "uuid",
  "folder_id": "uuid",
  "organization_index": "string",
  "metadata": {}
}
}
```

#### 409 — Creator hat Kinder

```
{
"ok": false,
"message": "Cannot delete creator with existing collections or tracks. Delete them first.",
"api_request_id": "uuid"
}
```
