LINE Messaging API · error code

LINE error 400: conflict richmenu alias id

Permanent - do not retryHTTP 400Rich menu errors

Last verified against LINE Developers - Messaging API reference (error responses)

What LINE returns
conflict richmenu alias id

What error 400 means

Creating a rich menu alias (POST /v2/bot/richmenu/alias) failed because an alias with the same richMenuAliasId already exists. The error table lists "The same ID as an already existing rich menu alias is specified" among the 400 reasons, with this message as the example.

Aliases are names that point at a rich menu ID; switch actions in your menus use them so tabs keep working when you swap menus. Creating an alias is a one-time act per name. To point an existing alias at a new menu, you update it with POST /v2/bot/richmenu/alias/{richMenuAliasId} instead. Deploy scripts that always "create" will succeed the first time and hit this error on every run after.

Note that this is a 400, not a 409: LINE reserves 409 on the Messaging API for the retry-key idempotency conflict. The same create endpoint has other 400 reasons too - a rich menu that doesn't exist or has no image (richmenu not found), an invalid alias or rich menu ID, and reaching the alias limit (the reference allows up to 1,000 aliases per LINE Official Account).

What it looks like

// If you specify the same rich menu alias ID as an existing rich menu alias (400 Bad Request)
{
    "message": "conflict richmenu alias id",
    "details": []
}

Why it happens

  • A deploy script calls create alias on every run instead of update after the first.
  • Two environments or services share one channel and both create the same alias name.
  • A retry after a lost response re-sends a create that already succeeded.

How to fix LINE error 400

  1. 1Check whether the alias exists with GET /v2/bot/richmenu/alias/{richMenuAliasId}.
  2. 2If it exists, call update rich menu alias with the new richMenuId instead of creating it.
  3. 3Write an upsert helper: try update, and create only if the alias doesn't exist.
  4. 4If you really want a clean slate, delete the alias first, then create it.

How to stop it recurring

Treat aliases as stable names created once, and rich menus as versions you point them at. Keep alias names in a single config file per channel and let deploys only update targets. Clean up unused aliases periodically, since the per-account alias limit applies and deleting is the only way to free slots.

Official reference: LINE Developers - Messaging API reference (error responses). See all LINE error codes or the LINE limits and quotas.

Related codes

Error 400 - quick answers

What does LINE error 400 mean?

Creating a rich menu alias ( POST /v2/bot/richmenu/alias ) failed because an alias with the same richMenuAliasId already exists. The error table lists "The same ID as an already existing rich menu alias is specified" among the 400 reasons, with this message as the example. Aliases are names that point at a rich menu ID; switch actions in your menus use them so tabs keep working when you swap menus.

How do I fix LINE error 400?

1. Check whether the alias exists with GET /v2/bot/richmenu/alias/{richMenuAliasId}. 2. If it exists, call update rich menu alias with the new richMenuId instead of creating it. 3. Write an upsert helper: try update, and create only if the alias doesn't exist. 4. If you really want a clean slate, delete the alias first, then create it.

Should I retry after error 400?

No. Retrying the same request produces the same error; the condition has to be fixed first. Treat it as a permanent failure for that message and surface it, rather than looping.

Stop debugging LINE by hand

Connect the channel through Conferbot: tokens, webhooks and retries are handled, failures show as readable status.