---
title: "Text the confirmation code again"
method: POST
path: "/carts/{cartId}/confirm/resend-code"
tags: ["Carts"]
---

# Text the confirmation code again

`POST /carts/{cartId}/confirm/resend-code`

## Request

- Base URL: `https://api.layout.link/v1`
- URL: `https://api.layout.link/v1/carts/{cartId}/confirm/resend-code`
- Auth: HTTP bearer

Texts the person a fresh code through the confirm's own check, which replaces any code already out for this cart. A cart that needs no code, and every sandbox cart except one at `test_place_code`, gets `code_not_needed`; at `test_place_code` nothing is texted and the code is `000000`. On a live build grant, a resend texts a code whenever the confirm would ask for one, which includes while the person has not yet agreed to your application ordering for them.

## Path parameters

- `cartId` string, required

## Headers

- `Layout-Version` '2026-10-01'
- `Idempotency-Key` string

## Response `200`

A fresh code was texted to the person. At the sandbox test_place_code nothing is texted; the code is 000000.

- CodeSent
  - `codeSent` true, required

## Other responses

- `400`: `unsupported_version`: the Layout-Version header names no version this API answers.
- `401`: The token is missing, expired, revoked, issued for another audience, or the person disconnected. Every 401 reads the same.
- `403`: `risk_denied`: Layout will not place this order. `build_only`: the person cannot confirm through Layout yet; `error.next.step` names what is missing (`sign_up_required`: sign up with this number and add a card; `connect_required`: approve a connect link because the number already has a Layout account; `link_expired`: the invitation is too old to claim; the person signs up to Layout themselves with this number, and then the step is `connect_required`; `phone_required`: verify their number; `card_required`: add a card), and `error.next.url`, when present, is the Layout page where the person does it. Otherwise: The credential is real and may not do this: an application or account that is suspended, a live person on an unapproved application, a scope the token was not granted, or a person whose Layout account cannot order yet.
- `404`: No such cart for this application and person. Another application's cart is a 404 too.
- `409`: `code_not_needed`: this cart takes no code; confirm it without one. `cart_closed` / `cart_not_ready`: nothing to confirm. `price_changed` / `over_daily_cap`: the confirm would be refused, so no code was sent. `texts_blocked`: the person's number replied STOP to Layout; they reply START to the number Layout texts from, then you resend. `already_confirmed`: the cart was already confirmed; `error.order` is the order and its state now. `idempotency_conflict`: the Idempotency-Key was already used with a different request. `in_progress`: the first request with that key is still running; retry after `Retry-After`.
- `429`: `rate_limited`: too many codes in a row, the cart's code limit, or the application's daily code limit.
- `500`: Layout failed to answer. Retry with backoff.
- `502`: `send_failed`: the code could not be texted. Nothing was charged. Retry shortly.
- `503`: Credentials or a dependency could not be checked right now. Retry with backoff.

---

[API](https://skmtc.dev/layout/apis/layout-partner-api.md) · [All operations](https://skmtc.dev/layout/apis/layout-partner-api/llms.txt) · [OpenAPI document](https://skmtc.dev/layout/apis/layout-partner-api/revisions/7ff4ba01bf56?raw)
