Skip to main content
POST/api/management/projects/{project}/redirects/

Parameters

NameParameter typeTypeDescription
projectId(required)pathstringThe project identifier found in the project overview screen of the management console.
redirect(required)bodyobjectThe redirect to create

Responses

HTTP status codeReasonModel
200SuccessRedirect
401UnauthorizedError
403ForbiddenError
404Project not foundError
500Internal server errorError

Examples

Begins with match
JSON
{
	"sourceDomain": "example.com",
	"destination": "/new-path",
	"statusCode": 301,
	"match": {
		"type": "beginsWith",
		"value": "/old-path"
	}
}
Exact match
JSON
{
	"sourceDomain": "example.com",
	"destination": "/exact-destination",
	"statusCode": 301,
	"match": {
		"type": "exactMatch",
		"value": "/specific-path"
	}
}
Regex match (PCRE format)
JSON
{
	"sourceDomain": "example.com",
	"destination": "/regex-destination",
	"statusCode": 301,
	"match": {
		"type": "regex",
		"value": "^/products/(.*){{APP}}quot;
	}
}
Begins with match with appending path
JSON
{
	"sourceDomain": "example.net",
	"destination": "/updated-path",
	"statusCode": 302,
	"appendSourcePathToDestination": true,
	"match": {
		"type": "beginsWith",
		"value": "/start-here"
	}
}
Exact Match with Temporary Redirect
JSON
{
	"sourceDomain": "example.org",
	"destination": "/temporary-redirect",
	"statusCode": 302,
	"match": {
		"type": "exactMatch",
		"value": "/temporary-path"
	}
}

Still need help?

If you still need help after reading this article, don't hesitate to reach out to the Contensis community on Slack or raise a support ticket to get help from our team.
New support request