# Roster

The Roster endpoints.

Paths start at `$ACTIVQC_BASE_URL`, and every call sends `Authorization: Bearer $ACTIVQC_KEY`. Errors use the [error envelope](https://activqc.wavbee.com/docs/errors.md). [All endpoints](https://activqc.wavbee.com/docs/api-reference.md).

## GET /v1/roster

List the approved artists, approved labels and high-profile names.

The names your releases are checked against. A main artist who is not an approved artist is asked about, and so is a record label that is not an approved one; while the lists are empty nobody is asked about. A release that credits a high-profile name goes to a person. The lists are the same for test and live keys. A console member needs the `rules` capability.

**Auth:** a secret key, `Authorization: Bearer $ACTIVQC_KEY`.

#### Parameters

| Name | In | Type | Description |
|---|---|---|---|
| `kind` | query | string | `artist`, `label` or `high_profile`. Left out: every list. |
| `q` | query | string | Part of a name; case and accents do not matter. |
| `limit` | query | integer | Names at a time, at most 200. Default `50`. |
| `cursor` | query | string | `next_cursor` of the page before. |

#### Example request

```bash
curl -s "$ACTIVQC_BASE_URL/v1/roster" \
  -H "Authorization: Bearer $ACTIVQC_KEY"
```

#### Responses

| Status | Meaning |
|---|---|
| `200` | The names, oldest first. |
| `422` | A list or a cursor that does not exist. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |

#### Response `200`

| Field | Type | Description |
|---|---|---|
| `object` | string | **Required.** Always `list`. |
| `data` | array of object | **Required.** |
| `data[].object` | string | **Required.** Always `roster_entry`. |
| `data[].id` | integer | **Required.** |
| `data[].kind` | string | **Required.** `artist` and `label`: approved. `high_profile`: a name a person checks. One of `artist`, `label`, `high_profile`. |
| `data[].name` | string | **Required.** |
| `data[].created_at` | string (date-time) | **Required.** |
| `has_more` | boolean | **Required.** |
| `next_cursor` | ["string", "null"] | **Required.** |

```json
{
  "object": "list",
  "data": [
    {
      "object": "roster_entry",
      "id": 1,
      "kind": "artist",
      "name": "string",
      "created_at": "2026-11-24T10:00:00Z"
    }
  ],
  "has_more": false,
  "next_cursor": {}
}
```

## POST /v1/roster

Add names.

Adds up to 200 names to one list. A name already on it, however it is spelled, is returned as it is, so sending a list twice is safe. A change applies from the next check.

**Auth:** a secret key, `Authorization: Bearer $ACTIVQC_KEY`.

#### Request body

`application/json`.

| Field | Type | Description |
|---|---|---|
| `kind` | string | **Required.** `artist`, `label` or `high_profile`. |
| `names` | array of string | **Required.** Up to 200 names of up to 200 characters. |

#### Example request

```bash
curl -s -X POST "$ACTIVQC_BASE_URL/v1/roster" \
  -H "Authorization: Bearer $ACTIVQC_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "kind": "string",
  "names": [
    "string"
  ]
}'
```

#### Responses

| Status | Meaning |
|---|---|
| `201` | The names, added or already there. |
| `422` | No name, too many, one too long, or no such list. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |

#### Response `201`

| Field | Type | Description |
|---|---|---|
| `object` | string | **Required.** Always `list`. |
| `data` | array of object | **Required.** |
| `data[].object` | string | **Required.** Always `roster_entry`. |
| `data[].id` | integer | **Required.** |
| `data[].kind` | string | **Required.** `artist` and `label`: approved. `high_profile`: a name a person checks. One of `artist`, `label`, `high_profile`. |
| `data[].name` | string | **Required.** |
| `data[].created_at` | string (date-time) | **Required.** |
| `added` | integer | **Required.** How many were new. |

```json
{
  "object": "list",
  "data": [
    {
      "object": "roster_entry",
      "id": 1,
      "kind": "artist",
      "name": "string",
      "created_at": "2026-11-24T10:00:00Z"
    }
  ],
  "added": 1
}
```

## DELETE /v1/roster/{id}

Remove a name.

Takes one name off its list. It applies from the next check.

**Auth:** a secret key, `Authorization: Bearer $ACTIVQC_KEY`.

#### Parameters

| Name | In | Type | Description |
|---|---|---|---|
| `id` | path | integer | **Required.** |

#### Example request

```bash
curl -s -X DELETE "$ACTIVQC_BASE_URL/v1/roster/{id}" \
  -H "Authorization: Bearer $ACTIVQC_KEY"
```

#### Responses

| Status | Meaning |
|---|---|
| `200` | The name removed. |
| `404` | Not a name of yours. [Error envelope](https://activqc.wavbee.com/docs/errors.md). |

#### Response `200`

| Field | Type | Description |
|---|---|---|
| `object` | string | **Required.** |
| `id` | integer | **Required.** |
| `deleted` | boolean | **Required.** |

```json
{
  "object": "string",
  "id": 1,
  "deleted": false
}
```

