# Get a new upload URL
URL: https://musicapi.com/docs/reference/recommendations-catalogue-upload-url.md

`POST https://api.musicapi.com/public/recommendations/catalogues/{catalogueId}/upload-url`

Section: Recommendations.
Product: MusicAPI Core.
Auth: Basic (any one of them). Use Basic with your Client ID and Client Secret from your server only.

Answers a new upload URL for the catalogue, to replace its file. Commit after the upload: the new file replaces the catalogue, and ISRCs that are not in the new file leave it. Needs Client Secret authentication.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `catalogueId` | string | yes | The catalogue id from `POST /public/recommendations/catalogues`. |

## Response 200

ok

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | yes |  |
| `uploadUrl` | uri | yes | PUT the file here. Valid for one hour. |
| `expiresAt` | date-time | yes |  |

```json
{
  "id": "42",
  "uploadUrl": "https://example.com",
  "expiresAt": "2026-10-16T09:41:07.000Z"
}
```

## Errors

- 401: No valid credential.
- 403: The request does not use Client Secret authentication.
- 404: `catalogue_not_found`: the catalogue does not exist or is not yours.
- 409: `catalogue_busy`: an import of the catalogue runs.
- 429: Your account sent more calls this minute than its rate limit allows.

## Example

```bash
curl -X POST "https://api.musicapi.com/public/recommendations/catalogues/{catalogueId}/upload-url" \
  -u "$MUSICAPI_CLIENT_ID:$MUSICAPI_CLIENT_SECRET"
```
