---
title: "Provide selfie for stateless authentication"
url: "https://developer.incode.com/api-reference/stateless-authentications-provide-reference-selfie/"
section: "api-reference"
group: "Onboarding authentication"
version: "v1.1"
status: "live"
endpoint: "POST /omni/stateless-authentications/provide/reference-selfie"
---
# Provide selfie for stateless authentication

`POST /omni/stateless-authentications/provide/reference-selfie`

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

A method to provide a reference selfie for stateless authentication.
(A selfie of the original onboarding that was approved but later removed from Incode storage).
This selfie will be used in authentication process if it's configured to be stateless.

## Path & query parameters

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

## Request body

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `base64Image` | string |  | Image of user's face represented in base64. |
| `customerId` | string |  | Customer Id. |
| `sessionId` | string |  | Session Id. |

## Responses

### 200

OK

Response body (`application/json`):

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `success` | boolean |  | Operation result. |
| `candidate` | string |  | Id of the candidate for reference selfie. |

## 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/stateless-authentications/provide/reference-selfie \
  -H "x-api-key: <YOUR_API_KEY>" \
  -H "api-version: 1.0" \
  -H "Content-Type: application/json" \
  -d '{
    "base64Image": "",
    "customerId": "",
    "sessionId": ""
  }'
```

### Node

```js
const res = await fetch("https://demo-api.incodesmile.com/omni/stateless-authentications/provide/reference-selfie", {
  method: "POST",
  headers: {
      "x-api-key": "<YOUR_API_KEY>",
      "api-version": "1.0",
      "Content-Type": "application/json",
  },
    body: JSON.stringify({
      "base64Image": "",
      "customerId": "",
      "sessionId": ""
    }),
});
const data = await res.json();
```

### Python

```python
import requests

headers = {
    "x-api-key": "<YOUR_API_KEY>",
    "api-version": "1.0",
    "Content-Type": "application/json",
}
res = requests.post("https://demo-api.incodesmile.com/omni/stateless-authentications/provide/reference-selfie", headers=headers, json={
  "base64Image": "",
  "customerId": "",
  "sessionId": ""
})
data = res.json()
```

### Java

```java
HttpRequest req = HttpRequest.newBuilder()
    .uri(URI.create("https://demo-api.incodesmile.com/omni/stateless-authentications/provide/reference-selfie"))
    .header("x-api-key", "<YOUR_API_KEY>")
    .header("api-version", "1.0")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\n  \"base64Image\": \"\",\n  \"customerId\": \"\",\n  \"sessionId\": \"\"\n}"))
    .build();
HttpResponse<String> res = HttpClient.newHttpClient()
    .send(req, HttpResponse.BodyHandlers.ofString());
```

### Example response

```json
{
  "success": true,
  "status": "OK"
}
```
