Hello everyone,
I'm Ajay, and I'm facing an issue with setting up 301 redirects using Zendesk's public APIs. Here’s what I have done so far:
I've set the redirects using the following cURL command:
curl --location 'https://spotdraft8511.zendesk.com/api/v2/guide/redirect_rules' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic *******************************' \
--header 'Cookie: __cfruid=***************************************' \
--data '{
"redirect_rule": {
"redirect_from": "/test",
"redirect_status": 301,
"redirect_to": "https://starship.spotdraftteam.com/hc/en-us/articles/20189112202269-Glossary-of-Terms"
}
}'
The API response confirms that the redirects are set:
{
"records": [
{
"id": "01J2ZXX210RNZNMR85AZX2NX4T",
"brand_id": "18869586801565",
"redirect_from": "/test",
"redirect_status": "301",
"redirect_to": "https://spotdraft8511.zendesk.com/hc/en-us/articles/20189112202269-Glossary-of-Terms",
"created_at": "2024-07-17T08:45:50.000Z",
"updated_at": "2024-07-17T08:45:50.000Z"
},
{
"id": "01J2ZXTRY6F4ST01XMNXX8XXSN",
"brand_id": "18869586801565",
"redirect_from": "/test/test",
"redirect_status": "301",
"redirect_to": "https://starship.spotdraftteam.com/hc/en-us/articles/20189112202269-Glossary-of-Terms",
"created_at": "2024-07-17T08:44:35.000Z",
"updated_at": "2024-07-17T08:44:35.000Z"
}
],
"meta": {
"has_more": false,
"after_cursor": "L3Rlc3QvdGVzdA==",
"before_cursor": "L3Rlc3Q="
}
}
Despite this confirmation, accessing starship.spotdraftteam.com/test leads to a 404 error.
The redirects are clearly broken.
I'm enrolled in the EAP/Beta feature for Custom URL Redirects API. The setup process included filling out a form, which I did. Despite re-attempting the redirects, they still don't work.
Here is the most recent API call I made:
curl --location 'https://spotdraft8511.zendesk.com/api/v2/guide/redirect_rules' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic *******************************' \
--header 'Cookie: __cfruid=***************************************' \
--data '{
"redirect_rule": {
"redirect_from": "/test2",
"redirect_status": 301,
"redirect_to": "https://starship.spotdraftteam.com//hc/en-us/articles/20189112202269-Glossary-of-Terms"
}
}'
Does anyone have insights or suggestions on why this might be happening and how I can resolve it? Any help would be greatly appreciated as this is critical for our go-live.
Thanks in advance!
Best,
Ajay
Hi Greg,
I haven't received any emails about this. Do you know how I can get them? I did fill out the EAP form.