Skip to main content
POST
/
publishing-bootstrap
/
scan
curl --request POST \
  --url https://api.royalti.io/publishing-bootstrap/scan \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{}'
{
  "status": "success",
  "message": "Publishing bootstrap scan queued",
  "data": {
    "jobId": "4821",
    "batchId": "publishing-bootstrap-6f1d2c3b-9a8e-4f5d-b0c1-2d3e4f5a6b7c"
  }
}
{
"status": "error",
"message": "<string>"
}
{
"status": "error",
"message": "<string>",
"code": "<string>",
"details": {}
}
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

POST /publishing-bootstrap/scan Description: Queues a background scan of the tenant catalog (optionally narrowed by assetIds and/or productId) for assets that have no linked CWR work. Each unlinked asset is staged as one skeleton work proposal — title and duration from the Asset row, seeded CWR defaults for languageCode/musicalWorkDistributionCategory/workType — and, unless enrich: false, enriched from MusicBrainz (ISRC → work MBID → ISWC + writer names/roles/IPIs, hard-limited to 1 request/second). The scan writes staging rows ONLY — no CWR work, writer, or link is created until POST /publishing-bootstrap/apply. Failed and rejected items from earlier batches are re-staged (the retry path); pending and imported items are deduplicated by match key. Poll GET /publishing-bootstrap/job/{jobId} for progress and the scan summary, then review via GET /publishing-bootstrap/batch/{batchId}/diff. Authorization:
  • Required role: admin or higher
Method: POST

Code Examples

const response = await fetch('https://api.royalti.io/publishing-bootstrap/scan', {
  method: 'POST',
  headers: {
    'Authorization': `Bearer ${token}`,
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "ref": "#/components/schemas/PublishingScanRequest"
  })
});

const data = await response.json();
console.log(data);
import requests

response = requests.post(
  'https://api.royalti.io/publishing-bootstrap/scan',
  headers={
    'Authorization': f'Bearer {token}'
  },
  json={"ref":"#/components/schemas/PublishingScanRequest"}
)

data = response.json()
print(data)
curl -X POST https://api.royalti.io/publishing-bootstrap/scan \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"ref":"#/components/schemas/PublishingScanRequest"}'

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json

All properties optional — an empty body scans the entire tenant catalog for assets without a linked CWR work.

assetIds
string<uuid>[]

Restrict the scan to these asset ids (capped at 5000 per scan).

Maximum array length: 5000
productId
string<uuid>

Restrict the scan to the assets of this product. Combined with assetIds, the intersection is scanned.

enrich
boolean
default:true

Enrich proposals from MusicBrainz (ISRC → work MBID → ISWC + writer names/roles/IPIs). MusicBrainz is rate-limited to 1 request/second, so enrichment of large catalogs takes minutes — the scan runs as a background job either way.

enrichCap
integer
default:500

Maximum number of assets to enrich from MusicBrainz in this scan; remaining proposals stay as unenriched skeletons.

Required range: x >= 0

Response

Scan queued — poll the returned jobId

status
string
Example:

"success"

message
string
Example:

"Publishing bootstrap scan queued"

data
object