POST /v1/inflow_routes
Scope
write_inflow_routes
Request parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
Idempotency-Key | header | string | required | Idempotency key (required). A UUID v4 is recommended. Resending the same key replays the original result, and the response carries Idempotent-Replay: true. Sending a different body with the same key returns 422, so always retry with the identical request. |
name | body | string | required | A name for the inflow route, for your own reference. |
link | body | string | optional | The destination URL. It must already contain a query string, because the distributed URL is built by appending &tracking={code}. If omitted, visitors land on the shop's top page. |
redirect_url | body | string | optional | Where to redirect after landing. The shop's own domain cannot be used. |
valid_from | body | string | optional | Date only — validity is evaluated by day, so no time component is carried. |
valid_to | body | string | optional | Date only — validity is evaluated by day, so no time component is carried. |
Response example
{
"data": {
"id": "42",
"code": "a7Kq2mZ0xB",
"name": "夏キャンペーン",
"link": "string",
"redirect_url": "string",
"valid_from": "2026-09-01",
"valid_to": "2026-12-31",
"created_at": "2026-06-01T03:00:00Z"
}
}
Description
Create an inflow route (code is server-generated)
Error response example
{
"error": {
"code": "insufficient_scope",
"message": "requires scope 'write_inflow_routes'",
"request_id": "req_01H..."
}
}
Possible errors: 400 / 401 / 403 / 422 / 503