Create domain redirection
POST
https://api.lws.net/v1/
operationIdpostDomainRedirect
Create a 301 (Moved permanently) or 302 (Found/Moved temporarily) redirection for the specified domain
Path parameters
-
domainstring required -
Domain whose redirection to create
Request body
application/json
-
typeintegerrequiredRedirection type (301 or 302)
-
redirectionstringrequiredURL to redirect to
Example request
{
"type": 301,
"redirection": "https://www.example.com"
}
Responses
200
Redirection created successfully
{
"code": 200,
"info": "Added a new redirection",
"data": {
"type": 301,
"redirection": "https://www.example.com"
}
}
Response fields 5 Extends ApiEnvelope
-
codeintegerApplication-level status/error code (not always equal to the HTTP status code)
-
infostringHuman-readable message describing the result of the request
-
dataobject -
typeintegerType of redirection to use. 301 (Moved permanently) or 302 (Found/Moved temporarily)
-
redirectionstringThe URL to where the redirection will be performed
201
Unable to add redirection at this moment
{
"code": 201,
"info": "Could not add redirection",
"data": {
"type": 301,
"redirection": "https://www.example.com"
}
}
Response fields 5 Extends ApiEnvelope
-
codeintegerApplication-level status/error code (not always equal to the HTTP status code)
-
infostringHuman-readable message describing the result of the request
-
dataobject -
typeintegerType of redirection to use. 301 (Moved permanently) or 302 (Found/Moved temporarily)
-
redirectionstringThe URL to where the redirection will be performed
314
Domain not found on account
314 is not a registered HTTP status code. It is specific to this API.
{
"code": 314,
"info": "Provided domain has not been found on your account. You must own this domain to manage it."
}
Response fields 2 Extends ApiEnvelope
-
codeintegerApplication-level status/error code (not always equal to the HTTP status code)
-
infostringHuman-readable message describing the result of the request
400
Invalid input
{
"code": 400,
"info": "Invalid input",
"data": []
}
Response fields 3 Extends ApiEnvelope
-
codeintegerApplication-level status/error code (not always equal to the HTTP status code)
-
infostringHuman-readable message describing the result of the request
-
dataobjectDetails about validation errors
500
Internal Server Error
{
"code": 500,
"info": "Internal Server Error",
"data": "string"
}
Response fields 3 Extends ApiEnvelope
-
codeintegerApplication-level status/error code (not always equal to the HTTP status code)
-
infostringHuman-readable message describing the result of the request
-
datastringError message
502
Bad Gateway
{
"code": 502,
"info": "Invalid response from upstream server",
"data": []
}
Response fields 3 Extends ApiEnvelope
-
codeintegerApplication-level status/error code (not always equal to the HTTP status code)
-
infostringHuman-readable message describing the result of the request
-
dataobjectInvalid response returned by the server
401
Unauthorized - Missing authentication headers
{
"code": 401,
"info": "Unauthorized access to the API. Please specify X-Auth-Pass and X-Auth-Login to proceed."
}
Response fields 2
-
codeinteger -
infostring
429
Rate limit exceeded
{
"code": 429,
"info": "Rate limit exceeded. Please try again later."
}
Response fields 2
-
codeinteger -
infostring