Update a Redirect
PUT
/api/v2/redirects/{id}.json
Update a redirect rule by its ID.
Scope
Requires the content
OAuth scope.
Parameters
Your request must provide the following URL parameters:
id
required
The ID of your Redirect object |
Request body
Your request body must contain an object including:
data
required
Containing updates to your Redirect object. |
Example JSON request
To update a Redirect you must PUT JSON to this resource within a data
object. You do
not need to supply all properties and may choose to only supply properties that require modifying.
For example, let's say you want to modify where an existing redirect rule sends the visitor to by changing the redirect path
.
{
"data": {
"path": "/new-redirect-from"
}
}
Success responses
If the Redirect was updated successfully you should receive a response with a 200
status
code:
success
A boolean where a value of true means the Redirect was created successfully.
|
status
The HTTP status code e.g. 200 means the Redirect was updated successfully. |
data
Contains the Redirect object you updated. |
Error responses
If the Redirect could not be updated you will encounter a response with either a 400
, 404
or
422
status code:
success
A boolean where a value of false means the Redirect could not be updated.
|
status
|
context
|
errors
Contains an array of error objects, each will have the following properties:
|