Skip to main content
Use this endpoint to rename a repository, update its description, or change its visibility between public and private. Only the repository owner can make these changes — users with Admin, Write, Clone, or Read access will receive a 403 error.

Request

PUT https://api.alphacast.io/repositories/{repository_id}
Send a JSON body with the Content-Type: application/json header.

Authentication

This endpoint requires HTTP Basic Auth. Pass your API key as the username and leave the password empty.
You must have Owner permission on the repository to update it. Requests from users with any other permission level will be rejected with a 403 Forbidden response.

Path parameters

repository_id
integer
required
The numeric ID of the repository to update.

Body parameters

name
string
required
New display name for the repository.
privacy
string
required
Visibility setting. Must be either "Public" or "Private".
description
string
Updated description of the repository’s contents or purpose.

Response

Returns 200 with the updated repository object.
id
integer
Unique numeric identifier for the repository.
name
string
Updated display name of the repository.
description
string
Updated description, if provided.
privacy
string
Updated visibility setting. Either "Public" or "Private".
team
string
The team this repository belongs to. Team association cannot be changed via this endpoint.
permission
string
Your access level. Remains "Owner" after an update.

Errors

StatusMeaning
403You do not have Owner permission on this repository.
404No repository with the given ID exists, or you do not have access to it.

Example

curl -u YOUR_API_KEY: \
  -X PUT \
  -H "Content-Type: application/json" \
  -d '{
    "name": "EM Macro — Archived",
    "description": "Historical GDP, inflation, and rates for EM economies",
    "privacy": "Public"
  }' \
  https://api.alphacast.io/repositories/101
{
  "id": 101,
  "name": "EM Macro — Archived",
  "description": "Historical GDP, inflation, and rates for EM economies",
  "privacy": "Public",
  "team": "research",
  "permission": "Owner"
}