# manage_redirects

> List, create or delete URL redirects on a domain — sending a path to another URL with a `301` (permanent) or `302` (temporary) status.

- Tier: W
- Required scope: read:hosting
- Annotations: none
- Docs: https://api.inleed.com/tools/manage-redirects

## Description

List, create or delete URL redirects on a domain — sending a path to another URL with a `301` (permanent) or `302` (temporary) status. `action=list` returns each redirect `{from, to, type, domain}` and needs only read access — a domain input covers that domain, a service id covers every domain on the account (`scope` says which). The writes need a domain input (an account id on a multi-domain account is refused with the domain list); `create` needs `from` (an absolute path like `/old`) and `to` (a URL), with `type` `301` (default) or `302`; `delete` needs `from`. Both writes require the `write:hosting` scope.

## Input schema

- `input` — string (required). A domain, email address, website URL, numeric service id, or hosting-account username the customer actually owns. Resolved to the owning account automatically; the resolved target is echoed back in the response.
- `action` — enum (required). list all redirects, create a new one, or delete one. create and delete require write:hosting. One of list, create, delete.
- `from` — string. The source path on the domain, as an absolute path like /old or /. Required for create and delete.
- `to` — string. For create: the destination — a full http(s):// URL or an absolute on-site path.
- `type` — enum. For create: 301 permanent (default) or 302 temporary. One of 301, 302.

## Example call

```json
{
  "name": "manage_redirects",
  "arguments": {
    "input": "example.se",
    "action": "list"
  }
}
```

