# Organisationen | AudioDN Docs

> API-Endpunkte zum Abrufen und Aktualisieren Ihrer AudioDN-Organisationseinstellungen, Branding, Webhooks und Konfiguration.

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

---

# Organisationen

Organisationen sind Top-Level-Entitäten, die Sammlungen und Tracks enthalten. Verwalten Sie Organisationseinstellungen, Themes und Player-Konfigurationen.

Antworten enthalten zwei schreibgeschützte Begleitfelder zu `player_color`: `player_color_light` (angepasst für Lesbarkeit auf hellem Hintergrund) und `player_color_dark` (angepasst für dunklen Hintergrund). Sie werden aus `player_color` abgeleitet, indem die Helligkeit verschoben wird, bis jeder einen Mindestkontrast erreicht, und können nicht direkt gesetzt werden.

#### webhook\_url ist hier schreibgeschützt

Das Feld `webhook_url` wird zur Referenz zurückgegeben, wird aber im Dashboard-Panel **Settings → Webhook** konfiguriert, nicht über diese API. Siehe die Docs zum [Track-Processing-Webhook](/docs/webhooks/track-processing) für Payload und Verhalten.

GET `/v1/organization/:organization_id`

Gibt Details zu einer bestimmten Organisation zurück

#### Parameter

| Name | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `organization_id` | uuid | Erforderlich | Die ID der abzurufenden Organisation (Pfadparameter) |

#### Beispielanfrage

    

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

```
const response = await fetch('https://api.audiodelivery.net/v1/organization/ORG_ID', {
  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/organization/ORG_ID")!)
    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/organization/ORG_ID")
        .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/organization/ORG_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",
"organization_id": "uuid",
"organization": {
  "id": "uuid",
  "name": "string",
  "theme": [],
  "is_theme_overridable": true,
  "is_cover_overridable": true,
  "player_color": "string",
  "player_color_light": "string | null",
  "player_color_dark": "string | null",
  "player_subtitle": "string",
  "webhook_url": "string | null"
}
}
```

PUT `/v1/organization/:organization_id`

Aktualisiert eine bestehende Organisation

#### Parameter

| Name | Typ | Erforderlich | Beschreibung |
| --- | --- | --- | --- |
| `organization_id` | uuid | Erforderlich | Die ID der zu aktualisierenden Organisation (Pfadparameter) |
| `name` | string | Optional | Name der Organisation |
| `theme` | array of objects | Optional | Aus Coverbildern extrahierte Farben. Array von Farbobjekten mit hex-, area-, lightness-, saturation-Werten |
| `is_theme_overridable` | boolean | Optional | Ob Organisations-Bildfarben überschrieben werden können |
| `is_cover_overridable` | boolean | Optional | Ob das Organisations-Cover überschrieben werden kann |
| `player_color` | string | Optional | Player-Farbe für die Organisation (Hex-Farbe) |
| `player_subtitle` | string | Optional | Player-Untertitel für die Organisation |

#### Beispielanfrage

    

```
curl -X PUT "https://api.audiodelivery.net/v1/organization/ORG_ID" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "My Organization",
  "player_color": "#FF0000"
}'
```

```
const payload = {
  "name": "My Organization",
  "player_color": "#FF0000"
};

const response = await fetch('https://api.audiodelivery.net/v1/organization/ORG_ID', {
  method: 'PUT',
  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/organization/ORG_ID")!)
    request.httpMethod = "PUT"
    request.setValue("Bearer YOUR_API_KEY", forHTTPHeaderField: "Authorization")
    request.setValue("application/json", forHTTPHeaderField: "Content-Type")
    let bodyJSON = """
{
  "name": "My Organization",
  "player_color": "#FF0000"
}
"""
    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 = """{
  "name": "My Organization",
  "player_color": "#FF0000"
}""".toRequestBody("application/json".toMediaType())
    val request = Request.Builder()
        .url("https://api.audiodelivery.net/v1/organization/ORG_ID")
        .put(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.put(
    Uri.parse("https://api.audiodelivery.net/v1/organization/ORG_ID"),
    headers: {
      "Authorization": "Bearer YOUR_API_KEY",
      "Content-Type": "application/json",
    },
    body: jsonEncode({
  "name": "My Organization",
  "player_color": "#FF0000"
}),
  );
  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",
"organization_id": "uuid",
"organization": {
  "id": "uuid",
  "name": "string",
  "theme": [],
  "is_theme_overridable": true,
  "is_cover_overridable": true,
  "player_color": "string",
  "player_color_light": "string | null",
  "player_color_dark": "string | null",
  "player_subtitle": "string",
  "webhook_url": "string | null"
}
}
```
