Create a redirect domain

Request Information
URL POST {{basepath}}/redirectdomain
CategoryRedirect

Description

Creates a RedirectDomain

Expects a RedirectDomainCreateRequest object.

Returns a RedirectDomainCreateResponse object.

JSON
{
    "domain": "{{testdomain}}",
    "rules": [
        {
            "subdomain": "*",
            "path": "\/*",
            "action": "302",
            "target": "https:\/\/www.metaregistrar.com\/wildcard"
        },
        {
            "subdomain": "redirect[1|3]",
            "path": "\/*",
            "action": "302",
            "target": "https:\/\/control-ote.metaregistrar.com\/?redirect1or3"
        },
        {
            "subdomain": "redirect2",
            "path": "\/*",
            "action": "302",
            "target": "https:\/\/control-ote.metaregistrar.com\/?redirect2"
        },
        {
            "subdomain": "redirect4",
            "path": "\/*",
            "action": "interstitial",
            "target": "https:\/\/control-ote.metaregistrar.com\/?redirect4"
        },
        {
            "subdomain": "frame",
            "path": "\/*",
            "action": "frame",
            "target": "http:\/\/control.metaregistrar.work\/frame"
        }
    ]
}

Example responses

Create a redirect domain on all subdomains and paths
Request Method & URL
POST {{basepath}}/redirectdomain
Request Body:
{
    "domain": "example2.com",
    "rules": [
        {
            "subdomain": "*",
            "path": "\/*",
            "action": "301",
            "target": "https:\/\/www.metaregistrar.com\/123"
        }
    ]
}
Response Code:
200 OK
Response Body:
{
    "responseId": "mapi1_4407c266c5c145242135ce1e7053662b9d7b4226",
    "status": "ok",
    "message": "RedirectDomain Created,pending sync"
}
Create a redirect domain with just redirects with specific subdomains and paths
Request Method & URL
POST {{basepath}}/redirectdomain
Request Body:
{
    "domain": "example2.com",
    "rules": [
        {
            "subdomain": "redirect[1|3]",
            "path": "\/*",
            "action": "302",
            "target": "https:\/\/control-ote.metaregistrar.com\/?redirect1or3"
        },
        {
            "subdomain": "redirect2",
            "path": "\/*",
            "action": "302",
            "target": "https:\/\/control-ote.metaregistrar.com\/?redirect2"
        },
        {
            "subdomain": "redirect4",
            "path": "\/*",
            "action": "interstitial",
            "target": "https:\/\/control-ote.metaregistrar.com\/?redirect4"
        }
    ]
}
Response Code:
200 OK
Response Body:
{
    "responseId": "mapi1_4407c266c5c145242135ce1e7053662b9d7b4226",
    "status": "ok",
    "message": "RedirectDomain Created,pending sync"
}