Skip to main content

POST /v1/inflow_routes

Scope

write_inflow_routes

Request parameters

NameInTypeRequiredDescription
Idempotency-KeyheaderstringrequiredIdempotency 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.
namebodystringrequiredA name for the inflow route, for your own reference.
linkbodystringoptionalThe 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_urlbodystringoptionalWhere to redirect after landing. The shop's own domain cannot be used.
valid_frombodystringoptionalDate only — validity is evaluated by day, so no time component is carried.
valid_tobodystringoptionalDate 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