---
title: "Complete Silent Network Authentication (SNA)"
url: "https://developer.incode.com/api-reference/sna-complete/"
section: "api-reference"
group: "Phone number input"
version: "v1.1"
status: "live"
endpoint: "POST /omni/sna/complete"
---
# Complete Silent Network Authentication (SNA)

`POST /omni/sna/complete`

Base URL: `https://demo-api.incodesmile.com` — Incode demo environment

Finishes the check started by `POST /omni/sna/initiate`. Send the `checkId` from the initiate
response together with the `code` obtained when the device followed `checkUrl`.

The endpoint always answers HTTP 200. When `match` is `true` the phone number is marked as verified
on the session, the same as a successful SMS OTP. When `success` is `false` the check did not
confirm the number and `shouldFallbackToOtp` is `true`: either let the user try another phone number
(when the flow has `snaRetryWithNewPhone` enabled) or continue with `GET /omni/send/otp` and
`GET /omni/compare/otp?code={code}` for the same number (both accept the same LIMITED token and
default to SMS).

## Path & query parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `api-version` | header | string | yes | Default: `1.0` |

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `checkId` | string | yes | `checkId` returned by `POST /omni/sna/initiate`. |
| `code` | string | yes | Code returned to the device by the redirect at the end of `checkUrl`. |

## Responses

### 200

OK

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean |  | `true` when the provider confirmed the device owns the phone number. |
| `method` | string |  | Verification method, always `SNA` for this endpoint. Enum: `SNA` |
| `checkId` | string |  | Identifier of the SNA check, echoed from the request. |
| `status` | string |  | Provider status of the check as returned by the provider, normally `COMPLETED`. `ERROR` when the check could not be completed; `PENDING` or `EXPIRED` when the device never finished `checkUrl`, in which case `match` is `false` and the client must fall back to SMS OTP. Enum: `ACCEPTED`, `PENDING`, `COMPLETED`, `EXPIRED`, `ERROR` |
| `match` | boolean |  | `true` when the device matched the phone number, `false` when it did not. `null` when the provider reported an error before producing a result. |
| `complete` | boolean |  | `true` when the check reached a final state and must not be completed again. |
| `shouldFallbackToOtp` | boolean |  | `true` whenever `success` is `false`: the client must verify the number with SMS OTP (or let the user enter another number when the flow has `snaRetryWithNewPhone` enabled). |
| `message` | string |  | Human readable outcome, for logging. Not meant to be shown to the end user. |
| `errorCode` | string |  | Present when `success` is `false`. `NO_MATCH`: the device does not own the number. `VERIFICATION_ERROR`: the check could not be completed. Any other value is the provider's own error code. |

## Code samples

Generated from this endpoint's method, path, and the conventional Incode headers. The base URL is the Incode demo environment; replace `<YOUR_API_KEY>` with a key for your region.

### cURL

```bash
curl -X POST https://demo-api.incodesmile.com/omni/sna/complete \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "X-Incode-Hardware-Id: <YOUR_INCODE_HARDWARE_ID>" \
  -H "api-version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "checkId": "<checkId>",
    "code": "<code>"
  }'
```

### Node

```js
const res = await fetch("https://demo-api.incodesmile.com/omni/sna/complete", {
  method: "POST",
  headers: {
      "x-api-key": "<YOUR_API_KEY>",
      "X-Incode-Hardware-Id": "<YOUR_INCODE_HARDWARE_ID>",
      "api-version": "1.0",
      "Content-Type": "application/json",
  },
    body: JSON.stringify({
      "checkId": "<checkId>",
      "code": "<code>"
    }),
});
const data = await res.json();
```

### Python

```python
import requests

headers = {
    "x-api-key": "<YOUR_API_KEY>",
    "X-Incode-Hardware-Id": "<YOUR_INCODE_HARDWARE_ID>",
    "api-version": "1.0",
    "Content-Type": "application/json",
}
res = requests.post("https://demo-api.incodesmile.com/omni/sna/complete", headers=headers, json={
  "checkId": "<checkId>",
  "code": "<code>"
})
data = res.json()
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://demo-api.incodesmile.com/omni/sna/complete"))
    .header("x-api-key", "<YOUR_API_KEY>")
    .header("X-Incode-Hardware-Id", "<YOUR_INCODE_HARDWARE_ID>")
    .header("api-version", "1.0")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"checkId\": \"<checkId>\",\n  \"code\": \"<code>\"\n}"))
    .build();
HttpResponse<String> res = HttpClient.newHttpClient()
    .send(req, HttpResponse.BodyHandlers.ofString());
```

### Ruby

```
require "net/http"
require "json"

uri = URI("https://demo-api.incodesmile.com/omni/sna/complete")
req = Net::HTTP::Post.new(uri)
req["x-api-key"] = "<YOUR_API_KEY>"
req["X-Incode-Hardware-Id"] = "<YOUR_INCODE_HARDWARE_ID>"
req["api-version"] = "1.0"
req["Content-Type"] = "application/json"
req.body = '{
  "checkId": "<checkId>",
  "code": "<code>"
}'

res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)
```

### PHP

```
$ch = curl_init("https://demo-api.incodesmile.com/omni/sna/complete");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "x-api-key: <YOUR_API_KEY>",
    "X-Incode-Hardware-Id: <YOUR_INCODE_HARDWARE_ID>",
    "api-version: 1.0",
    "Content-Type: application/json",
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{
  "checkId": "<checkId>",
  "code": "<code>"
}');

$data = json_decode(curl_exec($ch), true);
curl_close($ch);
```

### Example response

```json
{
  "success": true,
  "method": "SNA",
  "checkId": "string",
  "status": "ACCEPTED",
  "match": true,
  "complete": true,
  "shouldFallbackToOtp": true,
  "message": "string",
  "errorCode": "string"
}
```
