Help Center
Login Sign up
  1. Home
  2. API reference
  3. API documentation (JSON/XML)
  4. Tasks
  5. Redirect tasks

Redirect update

API reference (XML/JSON) · Updated 2023-09-18

Function

The RedirectUpdate task updates the data of a redirect. For example, the target address (target), mode or the backup target addresses (backup) can be changed.

Description

The structure for RedirectUpdate is similar to that of RedirectCreate. The values "source" and "type" must not be changed during the update. The value "type" cannot be changed because URLs are usually not valid email addresses and email addresses are usually not valid URLs.

Route: PUT /redirect/{source}

{
    "source": "example.com",
    "target": "example-target.com/test",
    "type": "DOMAIN",
    "mode": "HTTP"
}
{
    "stid": "20190701-app2-dev-15314",
    "status": {
        "code": "S0502",
        "text": "Redirect has been updated successfully.",
        "type": "SUCCESS"
    },
    "object": {
        "type": "Redirect",
        "summary": 1
    },
    "object": {
        "type": "Redirect",
        "value": "example.com",
        "data": {
            "created": "2014-10-24T09:43:47.000+0200",
            "updated": "2017-11-17T17:35:21.000+0100",
            "source": "example.com",
            "target": "example-target.com/test",
            "type": "DOMAIN",
            "mode": "HTTP",
            "domain": "example.com"
        }
    }
}