> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Confirm SMS Verification

> Validate an SMS verification code before completing a booking.

## Method

`POST` `/v1/verify/sms/confirm`

## Body Parameters

<ParamField name="phone" type="string" required>E.164-formatted phone number that received the code.</ParamField>
<ParamField name="code" type="string" required>Verification code (4–10 digits).</ParamField>

## Headers

<ParamField header="Authorization" type="string">Bearer token (e.g. <code>Authorization: Bearer YOUR\_API\_KEY</code>)</ParamField>
<ParamField header="content-type" type="string">`application/json`</ParamField>

## Request Example

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST https://api.voyantcloud.com/v1/verify/sms/confirm \
    -H "Authorization: Bearer $VOYANT_API_KEY" \
    -H "content-type: application/json" \
    -d '{ "phone": "+40700000000", "code": "583912" }'
  ```

  ```javascript Node.js theme={null}
  const res = await fetch("https://api.voyantcloud.com/v1/verify/sms/confirm", {
    method: "POST",
    headers: {
      Authorization: `Bearer ${process.env.VOYANT_API_KEY}`,
      "content-type": "application/json",
    },
    body: JSON.stringify({ phone: "+40700000000", code: "583912" }),
  })
  const payload = await res.json()
  ```

  ```python Python theme={null}
  import os, requests

  payload = {"phone": "+40700000000", "code": "583912"}
  resp = requests.post(
    "https://api.voyantcloud.com/v1/verify/sms/confirm",
    headers={
      "Authorization": f"Bearer {os.environ['VOYANT_API_KEY']}",
      "content-type": "application/json",
    },
    json=payload,
  )
  confirmation = resp.json()
  ```
</RequestExample>

## Response

<ResponseExample>
  ```json 200 OK theme={null}
  { "ok": true }
  ```

  ```json 400 Bad Request theme={null}
  { "error": "Invalid or expired code" }
  ```
</ResponseExample>

<Tip>Each code can be used once. Successful confirmations mark the record as consumed; subsequent attempts return the 400 error.</Tip>
