# Update Catalog Stream Tracking

Source: https://recoupable.dev/docs/api-reference/songs/update-catalog-stream-tracking

Control daily catalog tracking

## POST /api/catalogs/{catalogId}/stream-tracking

Full OpenAPI specification: https://recoupable.dev/docs/spec/releases.json

## Authentication

This operation requires one of the security alternatives in the specification below. Security scheme definitions are included where present in the published specification.

[Authentication guide](https://recoupable.dev/docs/authentication)

## Operation and referenced schemas

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Recoup API - Releases",
    "description": "API documentation for the Recoup platform - an AI agent platform for the music industry",
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.recoupable.dev"
    }
  ],
  "paths": {
    "/api/catalogs/{catalogId}/stream-tracking": {
      "post": {
        "summary": "Control daily catalog tracking",
        "description": "Enable starts initial 62-day backfill and daily refresh at 09:00 UTC. Source window ends two UTC dates before the run date to allow reporting lag; source freshness is not guaranteed. New recordings join the next run. Maximum 250 recordings per catalog; larger catalogs fail before provider calls. Disable fences future writes and retains saved history. Refresh claims at most one run per UTC day and subscription revision; repeated enable is idempotent. If today was already claimed, collection.state=already_claimed_or_disabled and no duplicate provider work starts; failed claims can run again the next day. Failures are isolated by recording and exposed in coverage. Standard MCP manage_catalog_stream_tracking. Enabled tracking makes asynchronous provider calls. API-key/Privy bearer auth supported; identity overrides rejected. Requires API and database feature release. Unchanged daily values reuse their saved versions; new dates and corrections are appended, with fresh coverage/provenance receipts for every run.",
        "security": [
          {
            "apiKeyAuth": []
          },
          {
            "bearerAuth": []
          }
        ],
        "parameters": [
          {
            "name": "catalogId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            },
            "description": "Catalog owned by the authenticated account or an organization it currently belongs to."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "action"
                ],
                "additionalProperties": false,
                "properties": {
                  "action": {
                    "type": "string",
                    "enum": [
                      "enable",
                      "disable",
                      "refresh"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Tracking state and asynchronous collection receipt",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string"
                    },
                    "catalog_id": {
                      "type": "string",
                      "format": "uuid"
                    },
                    "provider": {
                      "type": "string",
                      "enum": [
                        "luminate"
                      ]
                    },
                    "platform": {
                      "type": "string",
                      "enum": [
                        "all_dsps"
                      ]
                    },
                    "metric": {
                      "type": "string",
                      "enum": [
                        "daily_streams"
                      ]
                    },
                    "latest_run": {
                      "$ref": "#/components/schemas/CatalogStreamRun",
                      "description": "Run status, per-ISRC coverage, errors, window and completion timestamp."
                    },
                    "territory": {
                      "type": "string",
                      "enum": [
                        "worldwide"
                      ]
                    },
                    "tracking": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "catalog_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "owner_id": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "enabled": {
                          "type": "boolean"
                        },
                        "revision": {
                          "type": "string",
                          "format": "uuid"
                        },
                        "updated_at": {
                          "type": "string",
                          "format": "date-time"
                        }
                      }
                    },
                    "collection": {
                      "type": [
                        "object",
                        "null"
                      ],
                      "properties": {
                        "state": {
                          "type": "string",
                          "enum": [
                            "started",
                            "already_claimed_or_disabled"
                          ]
                        },
                        "run_id": {
                          "type": [
                            "string",
                            "null"
                          ],
                          "format": "uuid"
                        },
                        "workflow_run_id": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "Invalid input"
          },
          "401": {
            "description": "Authentication required"
          },
          "404": {
            "description": "Catalog not accessible"
          },
          "409": {
            "description": "Tracking must be enabled before refresh"
          },
          "429": {
            "description": "Too many tracking control requests; limited to 10 per account per minute across REST and MCP."
          },
          "503": {
            "description": "Storage, configuration or dispatch unavailable"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CatalogStreamRun": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "catalog_id": {
            "type": "string",
            "format": "uuid"
          },
          "revision": {
            "type": "string",
            "format": "uuid"
          },
          "scheduled_day": {
            "type": "string",
            "format": "date"
          },
          "since": {
            "type": "string",
            "format": "date"
          },
          "until": {
            "type": "string",
            "format": "date"
          },
          "status": {
            "type": "string",
            "enum": [
              "queued",
              "running",
              "complete",
              "partial",
              "failed",
              "cancelled"
            ]
          },
          "coverage": {
            "type": "object",
            "additionalProperties": {
              "$ref": "#/components/schemas/CatalogStreamReceipt"
            }
          },
          "error": {
            "type": [
              "string",
              "null"
            ]
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "finished_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "CatalogStreamReceipt": {
        "type": [
          "object",
          "null"
        ],
        "properties": {
          "state": {
            "type": "string",
            "enum": [
              "complete",
              "partial",
              "unavailable",
              "failed"
            ]
          },
          "observed_days": {
            "type": "integer",
            "minimum": 0,
            "maximum": 62
          },
          "retrieved_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "source_hash": {
            "type": [
              "string",
              "null"
            ]
          },
          "provider_recording_id": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      }
    },
    "securitySchemes": {
      "apiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "x-api-key",
        "description": "Your Recoup API key. [Learn more](/docs/quickstart#api-keys)."
      },
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  }
}
```
