---
title: "Validate GitHub target"
method: POST
path: "/v1/connectors/github/validate-target"
tags: ["GitHub"]
---

# Validate GitHub target

`POST /v1/connectors/github/validate-target`

Validates one repository-branch target before persisting it.

## Request body

- object
  - `installationId` integer, required
  - `repositoryId` integer, required
  - `repositoryFullName` string, required
  - `branch` string, required
  - `ref` string, required

## Response `200`

GitHub target validated successfully.

- PluginArchGithubValidateTargetResponse
  - `ok` true, required
  - `item` object, required
    - `branchExists` boolean, required
    - `defaultBranch` string, nullable, required
    - `repositoryAccessible` boolean, required

## Other responses

- `400` — The GitHub target validation request was invalid.
- `401` — The caller must be signed in to validate GitHub targets.

---

[API](https://skmtc.net/openworklabs/apis/den-api.md) · [All operations](https://skmtc.net/openworklabs/apis/den-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/openworklabs/den-api/versions/805150503452/schema)
