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

# Redirections

> List, create, update, and delete redirections.

A redirection sends visitors from an old path to a new path or URL. For fields and response details, see the [API reference](https://apidocs.neetokb.com/api/redirections/list.md).

## List redirections

This command lists redirections, newest first. The domain redirection is included.

```bash theme={"system"}
neetokb redirections list
neetokb redirections list --search-term refund
```

| Flag | Type | Required | Default | Description |
| - | - | - | - | - |
| `--page` | `int` | | `0` | Page number |
| `--page-size` | `int` | | `0` | Items per page (max 100) |
| `--search-term` | `string` | | | Show redirections whose from or to path contains this text |

## Show a redirection

This command shows one redirection.

```bash theme={"system"}
neetokb redirections show 5d2e8b17-6c4a-4f93-a0e1-72b9c3d8f406
```

**Required arguments:**

* `<id>` - Redirection ID from `redirections list`

## Create a redirection

This command creates a redirection. Creating one needs the Manage redirections permission.

```bash theme={"system"}
neetokb redirections create --from-path /old-refund --to-path /refund-policy
neetokb redirections create --type domain \
  --from-path https://old.example.com --to-path https://help.example.com
```

| Flag | Type | Required | Default | Description |
| - | - | - | - | - |
| `--from-path` | `string` | Yes | | Old path, or a bare origin such as [https://old.example.com](https://old.example.com) for a domain redirection |
| `--to-path` | `string` | Yes | | New path or full URL |
| `--type` | `string` | | | Redirection type: page (default) or domain |

`--type` takes `page` or `domain`. It defaults to `page`. For a domain redirection, `--from-path` is a bare origin. A redirection is refused when `--to-path` is empty, `--from-path` is already used, both paths are the same, or it would chain with another.

## Update a redirection

This command changes a redirection. Only the flags you pass change.

```bash theme={"system"}
neetokb redirections update 5d2e8b17-6c4a-4f93-a0e1-72b9c3d8f406 --to-path /refunds
```

**Required arguments:**

* `<id>` - Redirection ID from `redirections list`

| Flag | Type | Required | Default | Description |
| - | - | - | - | - |
| `--from-path` | `string` | | | Old path, or a bare origin such as [https://old.example.com](https://old.example.com) for a domain redirection |
| `--to-path` | `string` | | | New path or full URL |
| `--type` | `string` | | | Redirection type: page (default) or domain |

## Delete a redirection

This command deletes a redirection.

```bash theme={"system"}
neetokb redirections delete 5d2e8b17-6c4a-4f93-a0e1-72b9c3d8f406
```

**Required arguments:**

* `<id>` - Redirection ID from `redirections list`


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.