Developer reference
The CWR Check API
Everything the site does is an HTTP call you can make
yourself: validate CWR files, check a catalog for free, and generate
delivery-ready CWR 2.1/2.2. If /api/lint comes back
clean, /api/generate is guaranteed to succeed with the
same input. Everything is free while the service is in open beta.
Endpoints
| Endpoint | Limit | What it does |
|---|---|---|
| GET/api/account | 120/min | The account, its plan and where this month stands against it (`usage`: included, used, overage, ceiling, as /api/usage), the number of active API keys, and works counted by status. |
| DELETE/api/account | 120/min | Body: `{"confirm": "<the account email>"}`. Removes every work, import, mapping, delivery, ACK result, sender and API key of the account in one transaction (ADR-0041), ends the session, and answers with counts of what was removed. Cannot be undone. |
| PATCH/api/account | 120/min | Body: any of `name`, `company`, `locale` (en|ja|ko|es|de). |
| POST/api/account/ceiling | Body: `{"extra_works": n}`. Owner only. Raises the plan's safety ceiling for the current period (calendar month, plan year or free months) by `n` works, so a batch is not refused; works above the included amount are charged at the plan's overage rate. A refused delivery's `X-Works-Over` header says how many works it needs (ADR-0048). | |
| POST/api/account/checkout | Body: `{"plan": "starter|publisher|catalog"}`. Owner only. Returns `{"url": ...}`: a Stripe Checkout for the account's own email that returns to the portal's Settings. When it is paid, Stripe's webhook puts the plan on the account (ADR-0047). 409 if the account already subscribes: change plans in the billing portal instead. | |
| GET/api/account/members | The owner and up to 10 members (ADR-0045). Members see and do everything in the catalog; only the owner adds or removes members, opens billing or deletes the account. | |
| POST/api/account/members | Body: `{"email": "..."}`. Owner only. The invitee gets a sign-in link by email in the account's language; an address that already has its own account or belongs to another is refused (409). | |
| DELETE/api/account/members/{member_id} | Owner only. Ends the member's sessions and revokes the API keys they created. | |
| GET/api/account/notifications | Whether you get each email (ADR-0046): `acks` (an acknowledgement rejected or flagged works), `usage` (80% of the month's included works, or the ceiling reached) and `imports` (an uploaded sheet about to expire). Emails carry counts and links only. All on by default. | |
| PATCH/api/account/notifications | Body: any of `acks`, `usage`, `imports`, `results`, `uploads`, true or false. Applies to the signed-in person only. | |
| GET/api/account/results | What the subscription got you, for `month` (YYYY-MM, default this month) and for all time: works `delivered`, works `accepted` by societies and the `acceptance_rate`, `iswcs` assigned, rejected works `fixed` and then accepted, and problems `caught` before anything was sent. This month also carries `cost_usd` and `cost_per_accepted_usd`. Counts only. | |
| GET/api/acks | Your reconciled ACKs | |
| POST/api/acks | Multipart `file`: the acknowledgement a society sent back. Each acknowledged work is matched to your works by the submitter work number it echoes; the delivery it answers is the one holding the most matched works (ties: the latest). Matched works take the society's status (accepted, accepted_with_changes, needs_action, rejected; unknown leaves them as they were), its work number and any ISWC it assigned. Returns the counts per status and the `unmatched` numbers, which are reported and never stored. The ACK file itself is not kept (ADR-0041). | |
| GET/api/acks/{ack_id} | Counts, the matched delivery, and one row per matched work, rejected first: status, the society's status code, society work number, ISWC, and the society's messages verbatim (never translated, ADR-0025) with a gloss in `lang` where we recognise them. | |
| GET/api/acks/{ack_id}/report | ADR-0025's ACK report (verdict counts, then the works rejected first), rendered from the stored results in `lang` (default: the account's language). | |
| POST/api/acks/{ack_id}/resubmission | Body: `{"sender_id": ..., "receiver": optional}`. Creates a REV delivery of exactly the works this ACK marked rejected or needs_action, through POST /api/deliveries (so it is validated, quota-checked and metered the same way). The receiver defaults to the matched delivery's. | |
| GET/api/admin/leads | 5/min | The inquiry list, gated by CWRCHECK_ADMIN_TOKEN (set on Render). |
| GET/api/admin/usage | 30/min | Usage summary (counts and outcomes only), admin-token gated. |
| POST/api/auth/logout | Delete the session server-side and clear the cookie. | |
| POST/api/auth/request | Body: `{"email": "...", "lang": "en|ja|ko|es|de"}`. Creates the account on first use and emails a single-use link valid 15 minutes, in the account's language. Always answers 200 with the same body, whether or not the address had an account. Rate limit: 5/min per client. | |
| POST/api/billing/checkout | Start a Stripe Checkout for a plan subscription (ADR-0039). Body: ``{"email": "...", "plan": "starter|publisher|catalog"}``; ``plan`` defaults to Publisher. Returns ``{"url": ...}`` to redirect the buyer to Stripe. 503 until Stripe is configured via env; 422 for a plan that is not sold at checkout. | |
| POST/api/billing/claim | Exchange a paid checkout session id for the API key, once. | |
| POST/api/billing/portal | Returns `{"url": ...}`: a Stripe Customer Portal session for the account (plan change, cancellation, invoices). 409 when the account has no subscription. | |
| GET/api/deliveries | Newest first, without file contents, plus `receivers`: the receiver codes used before, most used first, and `known_receivers`: recipient codes from the sourced lookup table, for suggestions. | |
| POST/api/deliveries | Body: `sender_id`, `receiver` (2-3 letters or digits, the filename's), `version` (2.1|2.2, default the sender's), `transaction_type` (NWR|REV), and `work_ids` or `filter: {status, needs_rev}` (default ready works; `needs_rev` true picks the ones delivered before, false the ones never delivered) with `limit`. At most 2,000 works per delivery. Drafts are refused; works delivered before go only in a REV and new ones only in an NWR, never mixed. The plan's ceiling is checked before anything is generated (402, localized, as /api/generate). The file is generated, run through the validator, stored, and its works metered and marked delivered; a file with errors is stored with `valid: false` and its findings, and its works stay as they were. Rate limit: 30/min. | |
| GET/api/deliveries/{delivery_id} | Metadata, the validation findings (explained in `lang`, at most 200 listed) and the works it carried. | |
| GET/api/deliveries/{delivery_id}/file | The stored file, with its convention filename in Content-Disposition. | |
| GET/api/deliveries/{delivery_id}/report | The ADR-0015 HTML report of the stored file, in `lang` (default: the account's language). | |
| POST/api/generate | 30/min | Catalog in, fixed-width CWR file out, with a convention-conforming filename in Content-Disposition. A clean /api/lint on the same catalog guarantees this call succeeds, and the output passes /api/validate with zero errors. No API key is needed while billing is disabled (open beta); once enabled, pass X-API-Key. A work counts once per key per calendar month; above the plan's included works it is overage, and a file that would pass the plan's monthly ceiling is refused with 402 before anything is generated (`lang` localizes that refusal). Rate limit: 30/min. |
| GET/api/imports | Newest first: filename, row count, status (pending|applied|abandoned) and the counts-only summary. | |
| POST/api/imports | Multipart `file`: an .xlsx workbook (first sheet) or a CSV (UTF-8, BOM tolerated, delimiter sniffed), at most 10 MB and 20,000 rows. Returns the import `id`, `headers`, the first 20 `rows`, `row_count`, a `suggested_mapping` and the `saved_mapping` whose header signature matches, if any. The parsed sheet is held in memory only, for 24 hours, until it is applied (ADR-0041); the file itself is never stored. | |
| GET/api/imports/template.{extension} | `extension` is `xlsx` or `csv`. Column headers in `lang` (en|ja|ko|es|de), chosen so the import's suggestion maps every one without help, and one example row of fictional values showing the formats it reads. No sign-in needed. | |
| GET/api/imports/{import_id} | A pending import exactly as its upload returned it (`headers`, sample `rows`, `suggested_mapping`, `saved_mapping`), so the owner or a member can continue one someone else on the account uploaded. 409 once applied or abandoned, 410 when the sheet is no longer in memory (ADR-0041). | |
| DELETE/api/imports/{import_id} | Drops the parsed sheet from memory now. | |
| POST/api/imports/{import_id}/apply | Body: `{"spec": <mapping>, "save_mapping_as": "name" (optional), "sender_id": <optional>}`. Every row becomes a stored work, upserted by work number: `ready` when it lints clean, `draft` with its findings otherwise. Works re-imported unchanged keep their status. Applying never counts against the plan; only generation does. Returns the counts-only summary. | |
| POST/api/imports/{import_id}/preview | Body: `{"spec": <mapping>, "sender_id": <optional>}`. Applies the mapping to the first 50 rows and returns each resulting work with its `status` (ready|draft) and `findings` (code, JSON path in the work, technical message, and `explain` in `lang`). Nothing is stored. The sender (or the account's first) is the original publisher for the share complement and the prefix of generated work numbers. | |
| GET/api/keys | Each key's public id (the first 16 hex digits of its hash, as in the request log), label, dates and whether it came from checkout or the portal. Never the key itself. | |
| POST/api/keys | Body: `{"label": "..."}` (optional). Returns the key once, in `api_key`; it is stored only as a hash. At most 10 active keys per account. A key meters against the account's monthly count. | |
| DELETE/api/keys/{key_id} | Revoke an API key | |
| POST/api/leads | 5/min | Managed-service inquiry or API key request from the site. ``source`` says which on-site button led to the form (the writer check's summary or side panel, ADR-0033); any other value is dropped. The "website" field is a honeypot: humans never see it, bots fill it. Honeypotted submissions are acknowledged but not stored. UTM attribution captured on the page is stored with the lead, and each lead is mirrored to Formspree for the email notification. |
| POST/api/lint | 30/min | Dry run of a JSON catalog: schema validation with JSON paths plus the generator's own checks. A clean lint guarantees /api/generate succeeds with the same input. When the catalog builds, the response also carries `writers` (one row per distinct writer, with `paths` into the catalog such as `/works/3/writers/0`) and `writer_advisories` (questions the catalog raises about its writers: one name under several IPI name numbers, one number under several names, a controlled writer with no number). They are advisories: they never change `ok` or block generation. `lang=ja|ko|es|de` localizes their `explain`. Add `writer_check=true` to also look the catalog's writers up on Songlinks, exactly as `/api/validate` does: each row gains `songlinks` with advisory `chips`, and the response carries `writer_check` with `outcome` ok|partial|unavailable and the same `summary` and `audit`. Only valid writer IPI name numbers are sent. Off by default. Rate limit: 30/min. |
| GET/api/mappings | Your saved mappings | |
| POST/api/mappings | Body: `{"import_id": ..., "name": "...", "spec": <mapping>}`. Saves the mapping under that pending upload's header signature and imports nothing, so the next sheet with the same columns maps itself (ADR-0047). | |
| PATCH/api/mappings/{mapping_id} | Rename a saved mapping or replace its spec | |
| DELETE/api/mappings/{mapping_id} | Delete a saved mapping | |
| POST/api/notifications/unsubscribe | Body: `{"token": ..., "kind": "acks|usage|imports|results|uploads"}` from an email's unsubscribe link; an empty kind stops all three. | |
| GET/api/plans | The plans table (ADR-0039, ADR-0048): price, interval (month or year; an annual plan's included works and ceiling are per year), overage, ceiling, and whether each plan can be bought at checkout on this deployment. One source for the pricing page and integrations. | |
| GET/api/senders | Your sender profiles | |
| POST/api/senders | Body: `name` (HDR sender name, at most 45), `sender_type` (PB|SO|AA|WR), `sender_id` (an IPI name number for PB/AA/WR, checked by its check digits and at most 9 digits once leading zeros are dropped; a society code 1-999 for SO), `sender_code` (2-3 letters or digits, the filename's, unique per account), `default_version` (2.1|2.2) and `default_receiver`. | |
| GET/api/senders/{sender_id} | One sender profile | |
| PATCH/api/senders/{sender_id} | Body: `name` (HDR sender name, at most 45), `sender_type` (PB|SO|AA|WR), `sender_id` (an IPI name number for PB/AA/WR, checked by its check digits and at most 9 digits once leading zeros are dropped; a society code 1-999 for SO), `sender_code` (2-3 letters or digits, the filename's, unique per account), `default_version` (2.1|2.2) and `default_receiver`. | |
| DELETE/api/senders/{sender_id} | Delete a sender profile no delivery uses | |
| POST/api/share | 6/min | Create a shareable URL for one file's validation report. Opt-in persistence: the file is re-validated here and the server-rendered report -- never client-supplied HTML -- is stored for 30 days under an unguessable id. The uploaded file itself is still discarded. |
| GET/api/usage | 30/min | Current billing-period usage for the caller's API key. Includes a per-client breakdown so administrators can re-bill each catalog's owner for exactly the works generated for them. |
| POST/api/validate | 12/min | Validate up to 20 uploaded CWR files (10 MB / ~12,000 registrations each), statelessly. Returns per-file findings tied to line numbers, a work list, and a self-contained HTML report. Nothing is stored. Send **either** `files` (multipart uploads) **or** `text` (one file's contents as a form field, for pasted CWR — reported under the name `pasted.V21`, with the filename-convention warning suppressed because the name is ours, not yours). Supplying both, or neither, returns 422. Each file also carries `songlinks_check`: `null`, or `{writers, listed, url, save_url}` -- the number of writers with a valid IPI name number, how many the links list (at most 50), a songlinks.io/check link that looks them up in public registration data, and a songlinks.io/catalogue/add link that saves them to a free Songlinks catalogue. Nothing is sent to Songlinks by this call; the URLs are only returned. Each file also carries `writers` -- `{distinct, omitted, rows}`, one row per distinct writer with `name`, `ipi`, `ipi_valid`, `controlled`, `works` (in this file), `lines`, `advisories` and `songlinks_url` -- and `writer_advisories`: questions the file raises about its writers (one name under several IPI name numbers, one IPI name number under several names, a controlled writer with no IPI name number). Advisories are not findings: they never change `valid` or the counts. Add `writer_check=true` to also look the file's writers up on Songlinks, server to server: up to 200 valid writer IPI name numbers (never names) in calls of 50, 5 s each. Each row then carries `songlinks` (status, registered names, works, works elsewhere, a person link and advisory `chips`), and the file carries `writer_check` with `outcome` ok|partial|unavailable, a `summary` and an `audit`: the counts the site's Writers summary shows (`total`, `flagged`, `flagged_ipis`, `elsewhere_writers`, `works_elsewhere` counted once per Songlinks person, `spelling`, `split`, `none`, `several`) with `audit_url` (the flagged writers on Songlinks, null when none is flagged) and `save_url`. A failed lookup never fails validation. Off by default. Add `format=csv&table=works|parties|findings|ack|societies` for the same check as a spreadsheet, from either input and never truncated by catalog size. Rate limit: 12/min. |
| GET/api/works | Paginated by `cursor` (the `next_cursor` of the previous page), `limit` up to 200. Filter by `status` (draft|ready|delivered|accepted|accepted_with_changes|needs_action|rejected) and search title or work number with `q`. `needs_rev` marks a work delivered before and changed since: its next delivery is a REV. | |
| POST/api/works/bulk-delete | Body: `{"ids": [...]}` or `{"status": ...}`. | |
| GET/api/works/export.csv | ADR-0024's `works` columns, in contract order, as far as a catalog object fills them, plus `status`, `society_work_number`, `last_delivery` and `isrc`. UTF-8 with a BOM. `lang=ja|ko|es|de` labels the header row in that language; English keeps the contract's column names. | |
| POST/api/works/lint | 30/min | Body: `{"ids": [...]}` or `{"status": "draft"}`. Re-runs the schema and generator checks on each work and stores the result (status ready or draft), then runs ADR-0032's writer checks across the clean ones together: `writers` and `writer_advisories` as `/api/lint` returns them, with paths into the selection. |
| GET/api/works/{work_id} | The catalog object, its findings (explained in `lang`), the deliveries it went out in and what each ACK said about it. | |
| PATCH/api/works/{work_id} | Body: `{"catalog": <catalog work object>}`. Replaces the work, re-lints it, and sets its status to ready or draft. A work delivered before keeps `last_delivery_id`, so it is flagged `needs_rev`. | |
| DELETE/api/works/{work_id} | Delete a work |
No authentication, no signup: every endpoint is free to call within the rate limits while the service is in open beta.
Interactive documentation
Try every endpoint from the browser with Swagger UI, read the reference in ReDoc, or import the OpenAPI description into Postman, Insomnia, or a code generator.
Quick start
Check a catalog (start from the example):
curl -X POST https://cwrcheck.com/api/lint \ -H "Content-Type: application/json" \ -d @catalog.json
Generate and download the CWR file:
curl -X POST https://cwrcheck.com/api/generate \ -H "Content-Type: application/json" \ -d @catalog.json -OJ
Validate an existing CWR file:
curl -X POST https://cwrcheck.com/api/validate \ -F "files=@CW260001XXX_BMI.V21"
Python:
import requests
catalog = {
"sender": {"type": "PB", "id": 123456789, "name": "EXAMPLE MUSIC"},
"receiver": "BMI",
"works": [{
"title": "EXAMPLE SONG",
"submitter_work_number": "EX0001",
"writers": [{"ip_number": "W1", "last_name": "DOE",
"pr_share": 100}],
}],
}
# Free check first: clean lint guarantees generation succeeds.
lint = requests.post("https://cwrcheck.com/api/lint", json=catalog).json()
assert lint["ok"], lint
r = requests.post("https://cwrcheck.com/api/generate", json=catalog)
r.raise_for_status()
open(lint["filename"], "w").write(r.text)
JavaScript:
const catalog = { /* same shape as the Python example */ };
const lint = await fetch("https://cwrcheck.com/api/lint", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(catalog),
}).then((r) => r.json());
if (!lint.ok) throw new Error(JSON.stringify(lint.schema_errors));
const cwr = await fetch("https://cwrcheck.com/api/generate", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(catalog),
});
const file = await cwr.text(); // fixed-width CWR, filename in
// the Content-Disposition header
Exports
The same validation, as a spreadsheet. Add
format=csv and table= to
/api/validate and one file comes back as
text/csv with the filename in
Content-Disposition:
curl -X POST \ "https://cwrcheck.com/api/validate?format=csv&table=parties" \ -F "files=@CW260001XXX_BMI.V21" -OJ
Files are UTF-8 with a byte-order mark and
RFC 4180 quoting, so Japanese and Korean titles open correctly in
Excel. Unlike the HTML report, exports are never truncated — the
whole catalog goes in the file. The column contract is versioned:
this is v1, returned on
every export in the X-Export-Contract-Version header.
Columns are only ever appended within a version; removing, renaming,
or reordering one bumps it.
Pass lang=ja|ko|es|de to localize the explanation columns
of the findings table; the CWR spec’s own
message and a society’s
message_text are always verbatim.
works
Every work registration in the file, with its share totals and its finding counts. Row grain: one row per work transaction (NWR, REV, ISW, EXC).
| Column | Meaning |
|---|---|
line_number | Line of the transaction header in your file. |
transaction_type | NWR, REV, ISW or EXC. |
transaction_sequence | Transaction sequence number from the record prefix. |
submitter_work_number | Your own work number for this song. |
work_title | The work title as submitted. |
iswc | ISWC, when the file carries one. |
language_code | Language of the title. |
duration | Duration as HH:MM:SS, when present. |
musical_work_distribution_category | POP, JAZ, SER or UNC. |
version_type | ORI for an original work, MOD for a modified one. |
recorded_indicator | Whether a recording of the work has been released. |
publisher_count | Publisher records (SPU and OPU) in the transaction. |
writer_count | Writer records (SWR and OWR) in the transaction. |
pr_ownership_total | Performing-rights ownership across all parties, as a percentage. |
mr_ownership_total | Mechanical-rights ownership across all parties. |
sr_ownership_total | Synchronisation-rights ownership across all parties. |
pr_collection_total | Performing-rights collection shares across all parties. |
mr_collection_total | Mechanical-rights collection shares across all parties. |
sr_collection_total | Synchronisation-rights collection shares across all parties. |
share_total_status | ok, over or under -- the same verdict the report reaches. |
error_count | Findings of severity error on this work's records. |
warning_count | Findings of severity warning on this work's records. |
worst_severity | error, warning, or clean. |
parties
Every publisher and writer on every work, with ownership, collection, territories, and the net owned share. Row grain: one row per party per work.
| Column | Meaning |
|---|---|
submitter_work_number | Your own work number for the song this party is on. |
work_title | The work title as submitted. |
line_number | Line of this party's record in your file. |
record_type | SPU, OPU, SWR or OWR. |
party_sequence | Publisher sequence number, or the writer's position in the work. |
party_role | Publisher type (E, AM, SE ...) or writer designation (CA, C, A ...). |
controlled | yes for the S-prefixed record types, no for the O-prefixed ones. |
party_name | Publisher name, or writer last name. |
party_first_name | Writer first name; blank for publishers. |
ip_number | The submitter's own interested-party number. |
ipi_name_number | IPI name number, when supplied. |
ipi_base_number | IPI base number, when supplied. |
pr_society | Performing-rights society code affiliated to this party. |
pr_ownership_share | Performing-rights ownership share, as a percentage. |
mr_society | Mechanical-rights society code. |
mr_ownership_share | Mechanical-rights ownership share. |
sr_society | Synchronisation-rights society code. |
sr_ownership_share | Synchronisation-rights ownership share. |
pr_collection_share | Performing-rights collection share from this party's first included territory. |
mr_collection_share | Mechanical-rights collection share from that territory. |
sr_collection_share | Synchronisation-rights collection share from that territory. |
territories | TIS codes for this party, semicolon-separated, + included and - excluded. |
net_owned_pr | Publisher's own performing share plus its controlled writers'; blank on writer rows. |
net_owned_mr | The same for mechanical rights. |
net_owned_sr | The same for synchronisation rights. |
share_total_status | ok, over, under, or unknown when the publisher-writer chain is broken. |
findings
Every finding, with the spec's own wording and the plain-language explanation in your language. Row grain: one row per finding.
| Column | Meaning |
|---|---|
severity | error or warning. |
code | Stable identifier for this kind of problem. |
title | The problem in plain words, in the requested language. |
line_number | Line in your file; blank for file-level findings. |
record_type | The record type involved, when the finding names one. |
field | The field involved, when the finding names one. |
submitter_work_number | Work number of the song this line belongs to. |
work_title | Title of that song. |
message | The CWR spec's own wording. Always English -- societies quote it back. |
plain | The same finding as one sentence, using the record's own names and numbers. |
what | What the problem actually is. |
fix | What to do about it. |
ack
What the society said about each work you sent, one row per message. Row grain: one row per acknowledgement message, or one row per acknowledged work where the society sent no message.
| Column | Meaning |
|---|---|
line_number | Line of the ACK record in the file. |
original_transaction_type | The transaction type being acknowledged. |
original_group_id | Group id in the file you submitted. |
original_transaction_sequence | Transaction sequence number in the file you submitted. |
submitter_work_number | Your own creation number, echoed back. |
society_work_number | The number the society assigned. |
creation_title | The title as the society holds it. |
iswc | ISWC from the echoed original registration, when present. |
transaction_status | The raw transaction status code from the ACK record. |
ack_status | accepted, accepted_with_changes, rejected or unknown. |
processing_date | The date the society processed the transaction. |
message_count | How many messages the society sent about this work. |
message_sequence | 1-based position of this message; blank when there are none. |
message_type | Message type code from the MSG record. |
message_level | Message level code from the MSG record. |
validation_number | The society's validation number for the message. |
original_record_type | The record type the message is about. |
message_text | The society's own words, verbatim and never translated. |
glossed_code | Our finding code where the message maps onto one; blank otherwise. |
societies
Every society code the file references, and how often. Row grain: one row per distinct society code.
| Column | Meaning |
|---|---|
society_code | The three-digit CISAC society code as written in the file. |
society_name | The society's name; blank until the CISAC table ships. |
role | Which shares reference it: pr, mr, sr, semicolon-separated. |
occurrences | How many society fields in the file carry this code. |
first_line | The first line where it appears. |
known | known or unknown -- whether the code is in our society table. |
Lookup tables
Codes the import resolves by name. Each one is taken from the society’s own published material, never from a CISAC table, so the list is short on purpose. A code that is not here is not guessed: add it to your mapping’s value table instead.
societies
Tier 2, version 2026-10-15.2, retrieved 2026-10-15, 5 entries. Compiled by KTG from first-party public documents only: each society's or its own joint venture's published material. No CISAC table, and no third-party copy of one, is used (ADR-0026 point 1). Incomplete by construction: see docs/TABLES.md.
| Code | Name | Used as | Source |
|---|---|---|---|
010 | ASCAP | society, receiver | source |
021 | BMI | society, receiver | source |
101 | SOCAN | society, receiver | source |
707 | MusicMark | receiver | source |
000 | Multiple societies | receiver | source |
Rate limits
| Endpoint | Requests / minute |
|---|---|
| /api/account | 120 |
| /api/lint | 30 |
| /api/generate | 30 |
| /api/validate | 12 |
| /api/share | 6 |
| /api/auth | 5 |
Limits are per client, per minute. Exceeding one
returns 429 with Retry-After and
X-RateLimit-* headers saying exactly when to retry.
CORS is enabled, so the API is callable directly from browser apps.
Need more throughput?
Ask.
Responses and errors
A successful /api/lint looks like
this — ok: true is the guarantee that
/api/generate will succeed with the same input:
{
"ok": true,
"works": 3,
"filename": "CW260001KTG_BMI.V21",
"schema_errors": [],
"generator_error": null,
"writers": {"distinct": 2, "omitted": 0, "rows": [
{"name": "JANE DOE", "ipi": "00014107338", "works": 2,
"advisories": ["writer-name-several-ipis"],
"paths": ["/works/0/writers/0", "/works/2/writers/1"], "…": "…"}
]},
"writer_advisories": [
{"code": "writer-name-several-ipis",
"paths": ["/works/0/writers/0", "/works/2/writers/1"], "…": "…"}
]
}
A clean catalog also comes back with its
writers and the questions it raises about them
(writer_advisories), each pointing at the catalog by JSON
path. They are advisories: they never change ok or block
generation. Add ?writer_check=true to look the writers up
on Songlinks as well, exactly as /api/validate does.
A failing one names every problem with its JSON
path (schema_errors) or a plain-English generator
message. Every non-2xx response is a JSON envelope
{"detail": "…"} with a human-readable
explanation:
| Status | When |
|---|---|
| 413 | A file exceeds the 10 MB limit, or more than 20 files were sent. |
| 422 | The request body is invalid — malformed JSON, a missing mandatory field, or a catalog the generator cannot represent (the detail names the work). |
| 429 | Rate limit exceeded; comes
with Retry-After and X-RateLimit-*
headers. |
| 5xx | Our fault. If it persists, email alex@kanetechgroup.com. |
The catalog format
A catalog is one JSON object describing your
works. All shares are percentages (50 or
33.34); everything the CWR format needs beyond this
— record prefixes, sequence numbers, control totals, territory
records — is derived for you. The machine-readable source of
truth is catalog-v1.json
(JSON Schema 2020-12; point your editor's $schema
at it for autocomplete). Version policy: v1 only ever gains fields;
breaking changes would ship as catalog-v2.json.
Catalog
A work catalog accepted by cwrcheck.com's CWR generation service (POST /api/generate). Version 1: additive changes only; breaking changes will publish catalog-v2.json.
| Field | Type | Description |
|---|---|---|
version | 2.1 | 2.2 | CWR version to generate. Default "2.1". |
client | string | Optional label for the client this catalog belongs to (for administrators managing multiple catalogs). Usage reporting is broken down by this label so you can re-bill per client. Not written into the CWR file. |
transaction_type | NWR | REV | NWR for new registrations, REV for revisions. Default "NWR". |
sender required | object | |
sender_code | string | 2-3 character sender code for the delivery filename. Defaults to the first letters of the sender name. |
receiver | string | 2-3 character receiver code for the delivery filename, e.g. BMI. |
file_sequence | integer | Sequential number of this file within the year (filename only). Default 1. |
works required | work[] |
Work
| Field | Type | Description |
|---|---|---|
title required | string | |
submitter_work_number required | string | Your unique identifier for the work. |
iswc | string | International Standard Work Code, e.g. T1234567894. |
language_code | string | |
distribution_category | POP | SER | JAZ | UNC | Musical work distribution category. Default POP. |
version_type | ORI | MOD | ORI for original works, MOD for modifications. Default ORI. |
recorded | boolean | |
duration | string | HH:MM:SS. Required when distribution_category is SER. |
publishers | publisher[] | |
writers | writer[] | |
alternate_titles | alternate title[] |
Writer
| Field | Type | Description |
|---|---|---|
controlled | boolean | true emits an SWR (writer controlled by submitter), false an OWR. Default true. |
ip_number required | string | |
last_name required | string | |
first_name | string | |
designation | CA | C | A | AR | AD | SR … | Writer role: CA composer/author, C composer, A author, AR arranger, AD adaptor, SR sub-author, SA sub-arranger, TR translator, PA income participant. Default CA. |
ipi_name_number | string | |
pr_society | string | |
mr_society | string | |
sr_society | string | |
pr_share | share | A percentage between 0 and 100, e.g. 33.34. |
mr_share | share | A percentage between 0 and 100, e.g. 33.34. |
sr_share | share | A percentage between 0 and 100, e.g. 33.34. |
publisher_ip_number | string | ip_number of the publisher representing this writer; emits the PWR link. Must match a publisher on the same work. |
territories | territory[] | Collection territories. Omitted: world, collection equal to ownership. |
Publisher
| Field | Type | Description |
|---|---|---|
controlled | boolean | true emits an SPU (publisher controlled by submitter), false an OPU. Default true. |
sequence | integer | Publisher chain number. Default 1. |
ip_number required | string | |
name | string | |
type | E | SE | AM | PA | ES | Publisher type: E original, SE sub-publisher, AM administrator, PA income participant, ES substituted. Default E. |
ipi_name_number | string | |
pr_society | string | |
mr_society | string | |
sr_society | string | |
pr_share | number | Performing-rights ownership share; publishers may hold at most 50%. |
mr_share | share | A percentage between 0 and 100, e.g. 33.34. |
sr_share | share | A percentage between 0 and 100, e.g. 33.34. |
territories | territory[] | Collection territories. Omitted: world, collection equal to ownership (PR capped at 50%). |
Territory
| Field | Type | Description |
|---|---|---|
tis required | integer | CISAC TIS numeric territory code, e.g. 2136 for the world, 840 for the United States. |
include | boolean | true includes the territory, false excludes it. Default true. |
pr_share | share | A percentage between 0 and 100, e.g. 33.34. |
mr_share | share | A percentage between 0 and 100, e.g. 33.34. |
sr_share | share | A percentage between 0 and 100, e.g. 33.34. |
Alternate title
| Field | Type | Description |
|---|---|---|
title required | string | |
type | AT | TE | FT | IT | TT | PT … | Title type: AT alternative, TE first-line-of-text, FT formal, IT incorrect, OL original-language, AL alternative-in-other-language. Default AT. |
language_code | string |
Questions the reference doesn’t answer: alex@kanetechgroup.com — a human replies within one business day.