---
title: "Update repository"
method: POST
path: "/orgs/{org_slug}/repos/{repo_slug}"
tags: ["repos"]
---

# Update repository

`POST /orgs/{org_slug}/repos/{repo_slug}`

Update details of an existing repository.

This endpoint consumes 1 unit of your quota.

This endpoint requires the following org token scopes:
- repo:update

## Path parameters

- `org_slug` string, required
- `repo_slug` string, required

## Query parameters

- `workspace` string

## Request body

- object
  - `name` string — The name of the repository
  - `description` string, nullable — The description of the repository
  - `homepage` string, nullable — The homepage URL of the repository
  - `visibility` 'public' | 'private' — The visibility of the repository
  - `archived` boolean — Whether the repository is archived or not
  - `default_branch` string, nullable — The default branch of the repository
  - `workspace` string — The workspace of the repository

## Response `200`

Updated repository details

- object
  - `id` string — The ID of the repository
  - `created_at` string — The creation date of the repository
  - `updated_at` string — The last update date of the repository
  - `html_url` string — The URL to the repository dashboard page
  - `head_full_scan_id` string, nullable — The ID of the head full scan of the repository
  - `integration_meta` object, nullable
    - `type` 'github'
    - `value` object
      - `installation_id` string, required — The GitHub installation_id of the active associated Socket GitHub App
      - `installation_login` string, required — The GitHub login name that the active Socket GitHub App installation is installed to
      - `repo_name` string, nullable, required — The name of the associated GitHub repo.
      - `repo_id` string, nullable, required — The id of the associated GitHub repo.
  - `slug` string — The slug of the repository.
  - `name` string — The name of the repository
  - `description` string, nullable — The description of the repository
  - `homepage` string, nullable — The homepage URL of the repository
  - `visibility` 'public' | 'private' — The visibility of the repository
  - `archived` boolean — Whether the repository is archived or not
  - `default_branch` string, nullable — The default branch of the repository
  - `workspace` string — The workspace of the repository

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `403` — Insufficient max_quota for API method
- `404` — Resource not found
- `429` — Insufficient quota for API route

---

[API](https://skmtc.dev/socket-dev/apis/socket.md) · [All operations](https://skmtc.dev/socket-dev/apis/socket/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/socket-dev/socket/revisions/bf994b75d33f/schema)
