---
title: "Add repository to watch"
method: POST
path: "/repositories"
tags: ["Repository Credentials"]
---

# Add repository to watch

`POST /repositories`

## Query parameters

- `repository` string, required
- `autosubscribe` boolean
- `dryrun` boolean

## Headers

- `x-anchore-account` string

## Response `200`

Repository and discovered tags added

- Subscription[] — List of subscriptions
  - `subscription_key` string — The key value that the subscription references. E.g. a tag value or a repo name.
  - `subscription_type` string — The type of the subscription
  - `subscription_value` string, nullable — The value of the subscription target
  - `userId` string — The userId of the subscribed user
  - `active` boolean — Is the subscription currently active
  - `subscription_id` string — the unique id for this subscription record

## Changes

- **2021-04-01** `2b82abdbf272` — 1 warning
  - deleted the `query` request parameter `lookuptag`
- **2021-02-24** `3abc01be7dde` — 1 info
  - added the new optional `query` request parameter `lookuptag`
- **2021-02-23** `109aeab7480b` — 1 warning
  - deleted the `query` request parameter `lookuptag`
- **2020-07-13** `e1f2511870f7` — 1 info
  - added the new optional `query` request parameter `dryrun`
- **2020-03-17** `001d1fd95836` — 1 warning, 1 info
  - deleted the `query` request parameter `dryrun`
  - added the new optional `query` request parameter `lookuptag`

[Change history](https://skmtc.dev/anchore/apis/anchore-engine-api-server/changes/repositories/post.md)

---

[API](https://skmtc.dev/anchore/apis/anchore-engine-api-server.md) · [All operations](https://skmtc.dev/anchore/apis/anchore-engine-api-server/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/anchore/anchore-engine-api-server/revisions/afb4f60ab44a/schema)
