Skip to content

Evaluate a journey feature and redirect

GET
/v1/decide/forward
curl --request GET \
--url 'https://your-tenant-host/v1/decide/forward?feature=registered&site=site_example' \
--header 'x-edgekit-site-id: site_example'

A second transport over the same engine, not a second decision path. A top-level navigation: an <a href> or location.assign, never a fetch. Answers identically at /edgekit/v1/decide/forward. No API key and no origin check on either mount; the identity is the signed access cookie, and an asserted userId is refused (403). feature must name a published, journey-purpose feature on this site. That is checked before the engine runs, so a wrong-purpose or unknown name costs only the document read that resolved the site. The publish gate guarantees a journey feature resolves only to redirect outcomes, so this route redirects (302) to the resolved url, or to fallbackUrl when url did not resolve, or fails with an error. It never guesses a destination. Rate limited to 200 requests per 10 seconds per client per site. A journey feature charges no meter (the publish gate refuses one), so a repeated navigation costs nothing but the read.

feature
required

The journey-purpose feature to evaluate. Named by the caller, same as a batch entry.

string
>= 1 characters

Example

registered

The journey-purpose feature to evaluate. Named by the caller, same as a batch entry.

site

The site, for a navigation — which cannot set x-edgekit-site-id. The header wins when both are sent; one of them is required (400).

string
>= 1 characters <= 128 characters

Example

site_example

The site, for a navigation — which cannot set x-edgekit-site-id. The header wins when both are sent; one of them is required (400).

x-edgekit-site-id

The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.

string
>= 1 characters <= 128 characters

Example

site_example

The site this request is for, within this tenant. Every official EdgeKit SDK sets it from the client you configured; set it yourself only when calling this API directly.

x-edgekit-preview

A short-lived preview token for this site. When valid, the decision evaluates against the staged preview document instead of the live one, and the response’s preview field is true. An absent, expired or invalid token falls back to the live document, with no error.

string

A short-lived preview token for this site. When valid, the decision evaluates against the staged preview document instead of the live one, and the response’s preview field is true. An absent, expired or invalid token falls back to the live document, with no error.

Redirecting to the resolved destination, in Location. The body carries no JSON payload.

Location
required
string
Example
https://www.example.com/welcome

Invalid request.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Not allowed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Resource not found.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Request body too large.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Request validation failed.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Too many requests. Retry-After says when to retry.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

Unexpected error.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}

With Retry-After, briefly unavailable; without it, not configured.

Media typeapplication/json
object
error
required
object
code
required
string
message
required
string
details

Example

{
"error": {
"code": "unauthorized",
"message": "Invalid or missing API key."
}
}