Endpoint
Function signature
Request body
The domain from which the redirect originates
The domain to which the redirect points
The type of redirect. Must be either
permanent or temporaryIndicates whether the path should be forwarded
Indicates whether the query parameters should be forwarded
The sampling rate for analytics. Must be a value between 0 and 1
Type definitions
Response
HTTP status code
The created redirect object
Code example
The
samplingRate parameter controls what percentage of traffic is tracked for analytics. A value of 1.0 means 100% of requests are tracked, while 0.5 means 50% are sampled.