latestOpenAPI 3.0.3GitGuardian2026-08-201871515.0 MB

511b067cdcb1

Sources

Update a source

Update some source attributes such as monitored status and source criticality.

The monitored status can be updated for all source types except Custom Sources.

⚠️ Note: some sources types are supported on this endpoint, but cannot be updated yet on the dashboard.

Business sources can't be updated if your account doesn't have access to them.

patch/v1/sources/{source_id}

Path parameters

source_idinteger required
Example:5523

The id of the source to retrieve.

Request body

idinteger
urlstring uri
typestring
full_namestring
health'safe' | 'unknown' | 'at_risk'
default_branchstring nullable

Default branch of the source repository.

default_branch_headstring nullable

Reference of the HEAD of the default branch.

open_incidents_countinteger

Number of open secret incidents with at least one occurrence on this source.

closed_incidents_countinteger

Number of closed secret incidents with at least one occurrence on this source.

visibilitystring
external_idstring

VCS identifier of the source (e.g.: the GitHub id for a GitHub repository). Warning: external_id is a string because some VCS ids can be UUIDs.

source_criticalitystring

Criticality of the source.

monitoredboolean

Deprecated: use monitoring_status to read a source's real-time monitoring state (monitoring_status distinguishes disabled, archived, unreachable and deleted-on-remote sources, which this boolean cannot). Whether the source is currently monitored by GitGuardian.

monitoring_status'active' | 'disabled' | 'unreachable' | 'archived' | 'deleted_on_remote'

Real-time monitoring status of the source. Note: the unreachable and disabled buckets are not fully backed yet and may report active until the supporting backend lands.

deletedboolean

Whether the source has been deleted

Example request

{
  "id": 6531,
  "url": "https://github.com/GitGuardian/gg-shield",
  "type": "github",
  "full_name": "gitguardian/gg-shield",
  "health": "at_risk",
  "default_branch": "main",
  "default_branch_head": "abcd97b4aaf927ea934504263322e75e86c31xyz",
  "open_incidents_count": 3,
  "closed_incidents_count": 2,
  "visibility": "public",
  "external_id": "125",
  "source_criticality": "critical",
  "last_scan": {
    "date": "2021-05-20T12:40:55.662949Z",
    "status": "finished",
    "failing_reason": "DMCA takedown",
    "commits_scanned": 123,
    "branches_scanned": 2,
    "duration": "1:30.454444"
  },
  "monitored": true,
  "monitoring_status": "active",
  "deleted": true
}

Response

The source was updated successfully

idinteger
urlstring uri
typestring
full_namestring
health'safe' | 'unknown' | 'at_risk'
default_branchstring nullable

Default branch of the source repository.

default_branch_headstring nullable

Reference of the HEAD of the default branch.

open_incidents_countinteger

Number of open secret incidents with at least one occurrence on this source.

closed_incidents_countinteger

Number of closed secret incidents with at least one occurrence on this source.

visibilitystring
external_idstring

VCS identifier of the source (e.g.: the GitHub id for a GitHub repository). Warning: external_id is a string because some VCS ids can be UUIDs.

source_criticalitystring

Criticality of the source.

monitoredboolean

Deprecated: use monitoring_status to read a source's real-time monitoring state (monitoring_status distinguishes disabled, archived, unreachable and deleted-on-remote sources, which this boolean cannot). Whether the source is currently monitored by GitGuardian.

monitoring_status'active' | 'disabled' | 'unreachable' | 'archived' | 'deleted_on_remote'

Real-time monitoring status of the source. Note: the unreachable and disabled buckets are not fully backed yet and may report active until the supporting backend lands.

deletedboolean

Whether the source has been deleted

Example response

{
  "id": 6531,
  "url": "https://github.com/GitGuardian/gg-shield",
  "type": "github",
  "full_name": "gitguardian/gg-shield",
  "health": "at_risk",
  "default_branch": "main",
  "default_branch_head": "abcd97b4aaf927ea934504263322e75e86c31xyz",
  "open_incidents_count": 3,
  "closed_incidents_count": 2,
  "visibility": "public",
  "external_id": "125",
  "source_criticality": "critical",
  "last_scan": {
    "date": "2021-05-20T12:40:55.662949Z",
    "status": "finished",
    "failing_reason": "DMCA takedown",
    "commits_scanned": 123,
    "branches_scanned": 2,
    "duration": "1:30.454444"
  },
  "monitored": true,
  "monitoring_status": "active",
  "deleted": true
}