# Creators | AudioDN Docs

> API endpoints for creating, updating, listing, and deleting creators in AudioDN. Creators are sub-accounts under your organization used to classify collections and tracks and track per-creator usage.

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

---

# Creators

A creator is a sub-account under your organization, typically representing an individual content contributor such as an artist or podcaster. Creators are used to classify collections and tracks, scope them into a dedicated storage folder, and track usage at a granular level. Once a creator exists, pass its `creator_id` when creating collections, tracks, or upload sessions to associate them with that creator.

The `organization_index` is your own external identifier for the creator (for example, the creator's ID in your system). It is required when creating a creator and can be used to resolve the creator later if you do not have the AudioDN `creator_id` on hand.

GET `/v1/creator`

Returns a list of creators for an organization

#### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `limit` | number | Optional | Maximum number of creators to return |
| `offset` | number | Optional | Number of creators to skip |

#### Example Request

    

```
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.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>;
}
```

#### Response

```
{
  "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`

Returns details about a specific creator

#### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `creator_id` | uuid | Required | The ID of the creator to retrieve (path parameter) |

#### Response

```
{
  "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`

Creates a new creator

#### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organization_index` | string | Required | Your external identifier for the creator (the remote service identifier) |
| `metadata` | object | Optional | Organization metadata for the creator |

#### Example Request

    

```
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 response = await fetch('https://api.audiodelivery.net/v1/creator', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({"organization_index": "artist-123"})
});

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 body = {"organization_index": "artist-123"}
    request.httpBody = try JSONSerialization.data(withJSONObject: body)
    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")
        .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>;
}
```

#### Response

```
{
  "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"
  }
}
```

Creating a creator also provisions a dedicated storage folder and links it via `folder_id`. Collections and tracks created with this `creator_id` are stored in the same folder.

PUT `/v1/creator/:creator_id`

Updates an existing creator

#### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `creator_id` | uuid | Required | The ID of the creator to update (path parameter) |
| `organization_index` | string | Optional | Your external identifier for the creator |
| `metadata` | object | Optional | Organization metadata for the creator |

#### Response

```
{
  "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`

Soft-deletes a creator (only when it has no undeleted collections or tracks)

#### Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `creator_id` | uuid | Required | The ID of the creator to delete (path parameter) |

Creators never cascade. If the creator still has any undeleted collections or tracks, the request is rejected with `409` — delete those first. When no undeleted children remain, the creator's storage folder is soft-deleted along with the creator.

#### Example Request

    

```
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>;
}
```

#### Response

```
{
  "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 has children

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