---
title: "deleteRepoTag"
---

> Documentation Index
> Fetch the complete documentation index at: https://buildrforge.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# deleteRepoTag

Path: Forge API › tags

`DELETE /repos/{repo_id}/branches/{branch}/tags/{tag_id}`

Delete a tag. One that is on records is refused with RecordInUse unless cascade takes it off.

## Path parameters

- `repo_id` (`deleteRepoTag.path.repo_id`; string, required)
  - pattern: `^repo_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `branch` (`deleteRepoTag.path.branch`; string, required)
  - minLength: `1`
- `tag_id` (`deleteRepoTag.path.tag_id`; string, required)
  - pattern: `^tag_[0-7][0-9a-hjkmnp-tv-z]{25}$`

## Query parameters

- `cascade` (`deleteRepoTag.query.cascade`; string, optional)
  - one of `"true"`, `"false"`

## Code samples

### cURL

```bash
curl --request DELETE \
  --url '<base-url>/repos/<repo_id>/branches/<branch>/tags/<tag_id>'
```

### TypeScript

```typescript
const url = '<base-url>/repos/<repo_id>/branches/<branch>/tags/<tag_id>';
const options = {method: 'DELETE'};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "<base-url>/repos/<repo_id>/branches/<branch>/tags/<tag_id>"

response = requests.delete(url)

print(response.text)
```

## Responses

### 204

<No Content>

### 400

InvalidRequest

#### Example

```json
{
  "_tag": "InvalidRequest",
  "part": "path",
  "issues": [
    {
      "path": [
        "string"
      ],
      "message": "string"
    }
  ]
}
```

- `_tag` (`deleteRepoTag.response.400._tag`; string, required)
  - one of `"InvalidRequest"`
- `part` (`deleteRepoTag.response.400.part`; string, required)
  - one of `"path"`, `"query"`, `"headers"`, `"body"`
- `issues` (`deleteRepoTag.response.400.issues`; array of object, required)
  - `path` (`deleteRepoTag.response.400.issues.path`; array\<any of\>, required)
    - any of the following: `string`, `integer`
  - `message` (`deleteRepoTag.response.400.issues.message`; string, required)

### 401

InvalidCredentials

#### Example

```json
{
  "_tag": "InvalidCredentials"
}
```

- `_tag` (`deleteRepoTag.response.401._tag`; string, required)
  - one of `"InvalidCredentials"`

### 403

Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired

#### Example

```json
{
  "_tag": "Forbidden",
  "message": "string"
}
```

Any of the following:

- `ForbiddenEncoded`
  - `_tag` (`ForbiddenEncoded._tag`; string, required)
    - one of `"Forbidden"`
  - `message` (`ForbiddenEncoded.message`; string, required)
- `ForbiddenOriginEncoded`
  - `_tag` (`ForbiddenOriginEncoded._tag`; string, required)
    - one of `"ForbiddenOrigin"`
- `RequiresPersonalSessionEncoded`
  - `_tag` (`RequiresPersonalSessionEncoded._tag`; string, required)
    - one of `"RequiresPersonalSession"`
- `RunBranchRequiredEncoded`
  - `_tag` (`RunBranchRequiredEncoded._tag`; string, required)
    - one of `"RunBranchRequired"`
  - `branch` (`RunBranchRequiredEncoded.branch`; string, required)
    - minLength: `1`
  - `message` (`RunBranchRequiredEncoded.message`; string, required)

### 404

BranchNotFound | TagNotFound | RepoNotFound

#### Example

```json
{
  "_tag": "BranchNotFound",
  "branch": "string"
}
```

Any of the following:

- `BranchNotFoundEncoded`
  - `_tag` (`BranchNotFoundEncoded._tag`; string, required)
    - one of `"BranchNotFound"`
  - `branch` (`BranchNotFoundEncoded.branch`; string, required)
    - minLength: `1`
- `TagNotFoundEncoded`
  - `_tag` (`TagNotFoundEncoded._tag`; string, required)
    - one of `"TagNotFound"`
  - `tag_id` (`TagNotFoundEncoded.tag_id`; string, required)
    - pattern: `^tag_[0-7][0-9a-hjkmnp-tv-z]{25}$`
- `RepoNotFoundEncoded`
  - `_tag` (`RepoNotFoundEncoded._tag`; string, required)
    - one of `"RepoNotFound"`

### 409

RecordInUse | RepoArchived

#### Example

```json
{
  "_tag": "RecordInUse",
  "model": "string",
  "record_id": "string",
  "referencing_model": "string",
  "referencing_record_id": "string",
  "field": "string"
}
```

Any of the following:

- `RecordInUseEncoded`
  - `_tag` (`RecordInUseEncoded._tag`; string, required)
    - one of `"RecordInUse"`
  - `model` (`RecordInUseEncoded.model`; string, required)
    - minLength: `1`
  - `record_id` (`RecordInUseEncoded.record_id`; string, required)
    - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
  - `referencing_model` (`RecordInUseEncoded.referencing_model`; string, required)
    - minLength: `1`
  - `referencing_record_id` (`RecordInUseEncoded.referencing_record_id`; string, required)
    - pattern: `^[a-z](?:[a-z_]{0,61}[a-z])?_[0-7][0-9a-hjkmnp-tv-z]{25}$`
  - `field` (`RecordInUseEncoded.field`; string, required)
    - minLength: `1`
- `RepoArchivedEncoded`
  - `_tag` (`RepoArchivedEncoded._tag`; string, required)
    - one of `"RepoArchived"`

### 413

WriteTooLarge

#### Example

```json
{
  "_tag": "WriteTooLarge",
  "message": "string"
}
```

- `_tag` (`deleteRepoTag.response.413._tag`; string, required)
  - one of `"WriteTooLarge"`
- `message` (`deleteRepoTag.response.413.message`; string, required)

### 429

RateLimited

#### Example

```json
{
  "_tag": "RateLimited"
}
```

- `_tag` (`deleteRepoTag.response.429._tag`; string, required)
  - one of `"RateLimited"`

### 500

RepoFailure

#### Example

```json
{
  "_tag": "RepoFailure",
  "reason": "string"
}
```

- `_tag` (`deleteRepoTag.response.500._tag`; string, required)
  - one of `"RepoFailure"`
- `reason` (`deleteRepoTag.response.500.reason`; string, required)

### 503

RepoBusy | SessionUnavailable | RateLimitUnavailable

#### Example

```json
{
  "_tag": "RepoBusy",
  "message": "string"
}
```

Any of the following:

- `RepoBusyEncoded`
  - `_tag` (`RepoBusyEncoded._tag`; string, required)
    - one of `"RepoBusy"`
  - `message` (`RepoBusyEncoded.message`; string, required)
- `SessionUnavailableEncoded`
  - `_tag` (`SessionUnavailableEncoded._tag`; string, required)
    - one of `"SessionUnavailable"`
- `RateLimitUnavailableEncoded`
  - `_tag` (`RateLimitUnavailableEncoded._tag`; string, required)
    - one of `"RateLimitUnavailable"`


Source: https://buildrforge.com/docs/api/delete-repo-tag/index.md
