Stormkit Logo
Stormkit Logo
+ K
docsblogwhats new?pricingGitHubTwitterDiscordDiscordlogin
Welcome
Getting StartedSelf HostingContributingContact Us
Api
AuthenticationDomainsRedirectsSnippets

Redirects API

POST /v1/redirects

Set Environment Level Redirects.

interface Request {
  "redirects": []Redirect
}

interface Response {
  "redirects": []Redirect
}
# Example

curl -X POST \
     -H 'Authorization: <api_key>' \
     -H 'Content-Type: application/javascript' \
     'https://api.stormkit.io/v1/redirects` \
     -d '{ "redirects": [{ "from": "/path", "to": "/new-path" }] }'
GET /v1/redirects

Get Environment Level Redirects.

interface Response {
  "redirects": []Redirect
}
# Example

curl -X GET \
     -H 'Authorization: <api_key>' \
     -H 'Content-Type: application/javascript' \
     'https://api.stormkit.io/v1/redirects'
{
  "redirects": [{ "from": "*", "to": "index.html" }]
}

Syntax

interface Redirect {
  from: string
  to: string
  status?: 200 | 301 | 302
  assets?: boolean
  hosts?: string[]
}
Stormkit Logo

2024 Stormkit, Inc. ©

company
PricingPrivacy policyTerms