Endpoint
Function signature
export const getUserRedirects = async (): Promise<AxiosResponse>
Parameters
This endpoint does not require any parameters. It automatically fetches redirects for the authenticated user.
Response
Array of redirect objectsShow Redirect object properties
Unique identifier for the redirect
Either permanent or temporary
Whether path forwarding is enabled
Whether query parameter forwarding is enabled
Analytics sampling rate (0 to 1)
Timestamp when the redirect was created
Timestamp when the redirect was last updated
Code example
import { getUserRedirects } from '@/lib/api';
const fetchRedirects = async () => {
const response = await getUserRedirects();
const redirects = response.data;
console.log(`Total redirects: ${redirects.length}`);
return redirects;
};
This endpoint requires authentication. Ensure the user is logged in before making this request.
Error responses
Returned when the user is not authenticated
Show 500 - Internal Server Error
Returned when an unexpected error occurs on the server