Affiliate Portal API
Automate the network week: pull the order, load the audio, report what aired and acknowledge changes.
The station API gives your traffic and automation systems what the portal shows a person: each network's order for the week, its audio and printable documents, and a way to report what aired. It is JSON over HTTPS, and every call carries a station key.
Base URL
https://affiliates.radioworkflow.com/api/v1
Every path in this reference is under it. The same address serves the OpenAPI 3.1 document, without a key.
Quick start: a first call in five minutes
- Create a key. Sign in to the portal, open API and MCP (/developers), choose the stations, give it the
readandreportscopes and copy the secret. It is shown once. Keep it in an environment variable: the samples readAFFILIATE_API_KEY. - List your affiliations. Each is one station's relationship with one network, and its
idgoes in every other path. - Read the week. Use the affiliation's
idand the Monday of the broadcast week. Noteweek.epoch, and theidandrevof a unit whose window has closed. - Report one time. Send the unit's
idandrev, the week'sepoch, and the day and time it aired. The answer shows the unit as the network now sees it.
curl -X GET 'https://affiliates.radioworkflow.com/api/v1/affiliations' \ -H "Authorization: Bearer $AFFILIATE_API_KEY"
curl -X GET 'https://affiliates.radioworkflow.com/api/v1/affiliations/srn-ksmt/weeks/2026-09-21' \ -H "Authorization: Bearer $AFFILIATE_API_KEY"
# A new Idempotency-Key for every new request. Reuse it only to retry this same request.
IDEMPOTENCY_KEY=$(uuidgen)
curl -X POST 'https://affiliates.radioworkflow.com/api/v1/affiliations/srn-ksmt/weeks/2026-09-21/affidavits' \
-H "Authorization: Bearer $AFFILIATE_API_KEY" \
-H 'Content-Type: application/json' \
-H "Idempotency-Key: $IDEMPOTENCY_KEY" \
-d '{
"epoch": 1,
"items": [
{
"unit_id": "u-01oso1x",
"rev": 1,
"status": "aired",
"aired_date": "2026-09-22",
"aired_at": "07:42"
}
]
}'Every endpoint page has a Try it panel that runs the call on demo data with no key, so you can see each answer before you write any code.
Every request
- The key as a bearer token:
Authorization: Bearer rwaff_k_.... See Authentication. - Bodies are JSON objects, sent with
Content-Type: application/json; a log upload ismultipart/form-data. - The calls that record acknowledgements, affidavits, show certificates and log matches take an
Idempotency-Keyheader: a new one for every request and the same one to retry it, so a retry never records twice.upload-logis not idempotent: sending a file again is a new upload. See Pagination and idempotency. - A week is its Monday,
YYYY-MM-DD. Times are minutes after midnight (0 to 1439) orHH:MM, in the station's time zone.
Every response
X-Request-Idnames the request; quote it when you ask about one.RateLimit-Limit,RateLimit-RemainingandRateLimit-Resetreport the key's burst bucket. See Rate limits.Cache-Control: no-store: answers are never cached.- A refusal carries a status, a code and one sentence in the error envelope below. See Errors.
{
"error": {
"code": "epoch_changed",
"message": "The week changed since you read it. Read it again, then retry.",
"epoch": 2
}
}What a key cannot do
A key reads and reports; it never signs. Signing a week is an attestation that the affidavits are true, so a person does it in the portal. POST .../sign answers 403 key_cannot_sign for every key.
Assistants and coding agents
- An assistant can use these endpoints as tools through the MCP server, all but
upload-logandget-document; over MCP,get-week-audioreturns a link to the audio ZIP rather than the audio, andsign-weekonly returns the link where a person signs. - A coding agent can read /llms.txt, the index of these pages, or /llms-full.txt, all of them in one file.
- API tools and client generators read the OpenAPI document.