> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kosli.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Unarchive a repo

> **Beta** — the Repo moves feature is in beta. Requests from organizations without it enabled receive `403 Forbidden`.

Return the archived repo with internal `id` `{repo}` to the repo list, clearing when and by whom it was archived. Unarchiving a repo that is not archived changes nothing.



## OpenAPI

````yaml https://app.kosli.com/api/v2/openapi.json post /repos/{org}/{repo}/unarchive
openapi: 3.1.0
info:
  title: Kosli API
  summary: The API for communicating with Kosli
  description: >

    # Authentication 


    When making requests against Kosli API, you can authenticate your requests
    using a bearer token. 

    Set the bearer token in the request Authorization header to a valid API
    key. 

    API Keys can be personal or for service accounts. Check the [service
    accounts
    documentation](https://docs.kosli.com/getting_started/service-accounts/) for
    details. 


    ## Curl example


    ```shell

    curl -H "Authorization: Bearer <<your-api-key>>"
    https://app.kosli.com/api/v2/environments/<<your-org-name>>

    ```
  version: '2.0'
servers:
  - url: https://app.kosli.com/api/v2
    description: EU
  - url: https://app.us.kosli.com/api/v2
    description: US
security:
  - HTTPBearer: []
paths:
  /repos/{org}/{repo}/unarchive:
    post:
      tags:
        - Repos
      summary: Unarchive a repo
      description: >-
        **Beta** — the Repo moves feature is in beta. Requests from
        organizations without it enabled receive `403 Forbidden`.


        Return the archived repo with internal `id` `{repo}` to the repo list,
        clearing when and by whom it was archived. Unarchiving a repo that is
        not archived changes nothing.
      operationId: unarchive_repo
      parameters:
        - name: repo
          in: path
          required: true
          schema:
            type: string
            description: The repo's internal id (`id` in the repo response).
            title: Repo
          description: The repo's internal id (`id` in the repo response).
        - name: org
          in: path
          required: true
          schema:
            type: string
            title: Org
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RepoDetailResponse'
        '403':
          description: Only an org admin can unarchive repos
          content:
            application/json:
              example:
                message: Only an org admin can unarchive repos
              schema:
                $ref: '#/components/schemas/ForbiddenResponseModel'
        '404':
          description: Repo not found
          content:
            application/json:
              example:
                message: Repo not found
              schema:
                $ref: '#/components/schemas/NotFoundResponseModel'
      security:
        - HTTPBearer: []
        - HTTPBasic: []
components:
  schemas:
    RepoDetailResponse:
      properties:
        id:
          type: string
          title: Id
          description: The repo's internal id in Kosli, unaffected by renames.
        name:
          type: string
          title: Name
          description: The repo's full name at its VCS host, e.g. 'acme/payments'.
        short_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Short Name
          description: The last segment of `name`, e.g. 'payments'.
        url:
          type: string
          title: Url
          description: The repo's URL at its VCS host.
        provider:
          anyOf:
            - type: string
              enum:
                - github
                - gitlab
                - bitbucket
                - bitbucket_cloud
                - bitbucket_dc
                - azure-devops
                - azure_devops_services
                - azure_devops_server
                - circleci
                - git
                - subversion
            - type: 'null'
          title: Provider
          description: The VCS provider hosting the repo.
        repo_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Repo Id
          description: The id the VCS host gives the repo.
        vcs_instance:
          anyOf:
            - type: string
            - type: 'null'
          title: Vcs Instance
          description: The VCS host the repo is on, e.g. 'gitlab.company.com'.
        namespace_path:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Namespace Path
          description: >-
            The namespaces above the repo at its VCS host, outermost first, e.g.
            ['acme'].
        additional_info:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Additional Info
          description: >-
            Provider-specific details reported with the repo, e.g. a Bitbucket
            project key.
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
          description: The repo's description, as reported.
        tags:
          additionalProperties:
            type: string
          type: object
          title: Tags
          description: The tags set on the repo in Kosli.
        _links:
          anyOf:
            - additionalProperties:
                anyOf:
                  - $ref: '#/components/schemas/HALLink'
                  - items:
                      $ref: '#/components/schemas/HALLink'
                    type: array
              type: object
              description: >-
                Links to related resources, keyed by relation (`self`, `next`,
                ...), each a link or a list of links
            - type: 'null'
          title: Links
          description: >-
            Links to related resources, keyed by relation (`self`, `next`, ...),
            each a link or a list of links
        moved_to:
          anyOf:
            - type: string
            - type: 'null'
          title: Moved To
          description: >-
            The `id` of the repo this one moved to, whose builds and deployments
            include this repo's. Null when the repo has not moved.
        moved_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Moved At
          description: Unix time the move was recorded. Null when the repo has not moved.
        moved_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Moved By
          description: >-
            Display name of the user who recorded the move: null when the repo
            has not moved, and 'Unknown' when that user has been deleted.
        archived_at:
          anyOf:
            - type: number
            - type: 'null'
          title: Archived At
          description: Unix time the repo was archived. Null when it is not archived.
        archived_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Archived By
          description: >-
            Display name of the user who archived the repo: null when it is not
            archived, and 'Unknown' when that user has been deleted.
        moved_from:
          items:
            type: string
          type: array
          title: Moved From
          description: The `id`s of the repos that moved to this one.
      type: object
      required:
        - id
        - name
        - url
      title: RepoDetailResponse
    ForbiddenResponseModel:
      properties:
        message:
          type: string
          title: Message
          description: Error message
        errors:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Errors
          description: Validation errors by field
      type: object
      required:
        - message
      title: ForbiddenResponseModel
    NotFoundResponseModel:
      properties:
        message:
          type: string
          title: Message
          description: Error message
        errors:
          anyOf:
            - additionalProperties:
                type: string
              type: object
            - type: 'null'
          title: Errors
          description: Validation errors by field
      type: object
      required:
        - message
      title: NotFoundResponseModel
    HALLink:
      properties:
        href:
          type: string
          title: Href
          description: Absolute URL of the linked resource
      type: object
      required:
        - href
      title: HALLink
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.