---
title: "Repository API"
description: "This guide will teach you how to use the Repository API, which you'll use to retrieve basic information about your repository."
meta_title: "Repository API Technical Reference"
audience: developers
lastUpdated: "2025-11-06T01:07:50.000Z"
---

The Repository API is the gateway to your repository. When you query the Repository API, you get back some basic information about your repository, including the ID for the more recent version of your content: the master ref.

The Repository API endpoint is located on the same subdomain as your repository:

```bash
https://your-repo-name.cdn.prismic.io/api/v2
```

The Repository API is related to the Content API. Before you can query the Content API, you need to get a ref from the Repository API. The most important part of the API query is the `refs` array. A ref is an identifier for a specific version of your content, like *draft*, *scheduled*, or — most importantly — *newest*. Every time you publish changes, a new master ref is generated.

The current version of your content is the "master ref.” Prismic may store older refs. This ensures that a ref will work even if content has been changed since the request was initiated. However, in general, you should always use the most recent ref, as old refs will get purged eventually.

The refs array also contains a ref for each [release](https://prismic.io/docs/releases.md) in your repository.

Here is an example response from the Repository API:

```json
{
  "refs": [
    {
      "id": "master",
      "ref": "ZG5h3BAAAB8AhmzJ",
      "label": "Master",
      "isMasterRef": true
    },
    {
      "id": "ZIBvwhAAACMAgx9w",
      "ref": "ZIBvwxAAACEAgx93~ZIBJVRAAACMAgmBd",
      "label": "",
      "scheduledAt": 1696633200000
    }
  ],
  "bookmarks": {},
  "experiments": {
    "draft": [],
    "running": []
  },
  "types": {
    "home": "Home",
    "pages": "Pages"
  },
  "languages": [
    {
      "id": "en-us",
      "name": "English - United States"
    },
    {
      "id": "en-gb",
      "name": "English - United Kingdom"
    }
  ],
  "forms": "// Omitted ",
  "oauth_initiate": "https://your-repo-name.prismic.io/auth",
  "oauth_token": "https://your-repo-name.prismic.io/auth/token",
  "tags": [],
  "license": "All Rights Reserved",
  "version": "482083b"
}
```

Here are all of the properties on the Repository API:

<Table>
  <tbody>
    <tr>
      <TableCell>`refs` array</TableCell>

      <TableCell>
        An array containing the available refs from your repository. To make a releases ref appear in your API response, provide a master+releases access token with your API query or set your repository’s API visibility to Open API. For more information, see the [Access Token guide](https://prismic.io/docs/fetch-content.md#content-visiblity).
      </TableCell>
    </tr>

    <tr>
      <TableCell>`refs[index]` object</TableCell>

      <TableCell>
        An item in the `refs` array referring to a specific ref. The first item is always the master ref.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`refs[index].id` string</TableCell>

      <TableCell>
        The unique identifier for the ref. For the master ref, this is `“master”` and for other refs, is an alphanumeric string. A release ref’s `id` is made up of two hashes separated by a hash symbol. The first hash in the ref is updated whenever a change is made in the release, such as another page being added or edited. The second hash in the ref is updated whenever a page in the repository is published.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`refs[index].label` string</TableCell>

      <TableCell>
        A human-readable name for the ref. The master ref is always named `"Master"`, and by default, a scheduled release always has an empty label. A custom label can be set in the Page Builder.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`refs[index].isMasterRef` boolean</TableCell>

      <TableCell>
        A boolean present if the current array item refers to the master ref.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`refs[index].scheduledAt` string</TableCell>

      <TableCell>
        A string present if the current array item refers to a scheduled release ref. The `scheduledAt` string contains the Unix timestamp at which the release will be automatically published.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`bookmarks` object</TableCell>

      <TableCell>
        The `bookmarks` property is deprecated. It refers to a feature that Prismic no longer supports.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`experiments` object</TableCell>

      <TableCell>
        The `experiments` property is deprecated. It refers to a feature that Prismic no longer supports.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`types` object</TableCell>

      <TableCell>
        A list of the repository's type API IDs mapped to their human-readable name. For more details, see the [Custom Types API](https://prismic.io/docs/custom-types-api.md) technical reference.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`types[type_id]` array item</TableCell> <TableCell>The display name for the type with the given ID.</TableCell>
    </tr>

    <tr>
      <TableCell>`languages` object</TableCell>

      <TableCell>
        A list of the repository’s locale IDs mapped to their human-readable name.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`languages[index]` object</TableCell>

      <TableCell>
        An item in the `languages` array referring to a specific locale. The first item is always the master locale.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`languages[index].id` string</TableCell> <TableCell>The locale ID of the language.</TableCell>
    </tr>

    <tr>
      <TableCell>`languages[index].name` string</TableCell> <TableCell>The locale display name of the language.</TableCell>
    </tr>

    <tr>
      <TableCell>`forms` object</TableCell> <TableCell>An object containing internally-used API features.</TableCell>
    </tr>

    <tr>
      <TableCell>`oauth_initate` string</TableCell>

      <TableCell>
        The URL used to begin the OAuth process for the repository when using a temporary access token. For more information, see the [Access Token](https://prismic.io/docs/fetch-content.md#content-visiblity) guide.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`oauth_token` string</TableCell>

      <TableCell>
        The token used for the OAuth process when using a temporary access token. For more information, see the [Access Token](https://prismic.io/docs/fetch-content.md#content-visiblity) guide.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`tags` array</TableCell>

      <TableCell>
        Will be empty as this field is deprecated. The tags field is now available inside the form fields. See “[A change to how the Prismic API handles tags”](https://prismic.io/blog/a-change-to-how-the-prismic-api-handles-tags) for more information.
      </TableCell>
    </tr>

    <tr>
      <TableCell>`license` string</TableCell>

      <TableCell>
        The license for the repository content. The repository’s license can be changed with the API visibility setting. For more information, see the [Access Token guide](https://prismic.io/docs/fetch-content.md#content-visiblity).
      </TableCell>
    </tr>

    <tr>
      <TableCell>`version` string</TableCell>

      <TableCell>
        The version identifier of the API. The version string is used internally for debugging purposes.
      </TableCell>
    </tr>
  </tbody>
</Table>
