REST

API para o agente que faz o upload.

Autenticação por chave, criada em Definições. Header Authorization: Bearer aftr_… ou X-Api-Key. A spec OpenAPI está em /openapi.yaml.

openapi.yaml · Criar uma chave

Lançamento

curl -X POST https://aftrphase.com/api/v1/releases \
  -H "Authorization: Bearer $AFTRPHASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "submit": false,
    "type": "Single",
    "title": "Neon Tide",
    "participants": [{"name": "LUNA MAR", "role": ["primary"]}],
    "tracks": [{"title": "Neon Tide", "audioUrl": "https://example.com/neon.flac"}]
  }'

Áudio e capa

Multipart ou URL. O áudio tem de ser FLAC (magic fLaC). A capa pode ser PNG, JPEG ou WebP, ou um URL https que a Toolost consiga buscar.

curl -X POST https://aftrphase.com/api/v1/releases/REL/audio \
  -H "Authorization: Bearer $AFTRPHASE_API_KEY" \
  -F "file=@track.flac"
curl -X POST https://aftrphase.com/api/v1/releases/REL/artwork \
  -H "Authorization: Bearer $AFTRPHASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://cdn.example.com/cover.jpg"}'

Lote

curl -X POST https://aftrphase.com/api/v1/bulk \
  -H "Authorization: Bearer $AFTRPHASE_API_KEY" \
  -F "manifest=@lancamentos.csv" \
  -F "neon-tide.flac=@neon-tide.flac" \
  -F "neon-cover.jpg=@neon-cover.jpg"

Scopes: catalog:read, catalog:write, preferences:read, preferences:write, account:read. Cada mutação fica no audit log com a chave usada.

Rotas