---
title: "Update custom sink declaration"
method: POST
path: "/api/v2/customSinks/update"
tags: ["Custom Sinks"]
---

# Update custom sink declaration

`POST /api/v2/customSinks/update`

## Request

- Base URL: `https://zeropath.com`
- URL: `https://zeropath.com/api/v2/customSinks/update`
- Auth: API key in header `X-ZeroPath-API-Token-Id` and API key in header `X-ZeroPath-API-Token-Secret`

Update an existing custom sink declaration. Only `declarationId` is required. If `description` is changed, the LLM guard re-validates it. Pass `repositoryIds` as an empty array to make it org-wide.

## Request body

- UpdateCustomSinkInput
  - `organizationId` string
  - `declarationId` string, required
  - `name` string
  - `description` string: Natural language description. If changed, the LLM guard re-validates it.
  - `globPattern` string
  - `repositoryIds` string[]: Repository IDs to restrict this sink to; an empty array makes it org-wide. Omit to keep the current scope.
  - `scope` 'allRepositories' | 'repositories' | 'tags': Optional explicit scope. Use tags with tagIds to switch the sink to tag-only scope.
  - `tagIds` string[]: Tag IDs to associate with this sink

## Response `200`

Sink declaration updated successfully

- CustomSink
  - `id` string, required
  - `name` string, required
  - `description` string, required
  - `globPattern` string, required
  - `enabled` boolean, required
  - `repositoryIds` string[], required
  - `scope` 'allRepositories' | 'repositories' | 'tags', required: Where the declaration applies: every repository, the listed repositories, or repositories carrying its tags.
  - `tags` RuleTag[], required
    - `id` string, required
    - `name` string, required
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `400`: Error Response
- `401`: Error Response
- `404`: Error Response

---

[API](https://skmtc.dev/zeropath/apis/zeropath-api.md) - [All operations](https://skmtc.dev/zeropath/apis/zeropath-api/llms.txt) - [OpenAPI document](https://skmtc.dev/zeropath/apis/zeropath-api/revisions/126e9c80ba0d?raw)
