FaceSign
REST API Reference

Create a verification session

Creates a new identity verification session with the specified configuration

POST
/sessions

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication. Use format "Bearer sk_prod_..." or "Bearer sk_test_..."

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://api.facesign.ai/sessions" \  -H "Content-Type: application/json" \  -d '{    "clientReferenceId": "user-123",    "metadata": {      "source": "web-app"    },    "flow": [      {        "id": "start",        "type": "start",        "outcome": "greeting"      },      {        "id": "greeting",        "type": "conversation",        "prompt": "Say: Hello! What\'s your name?",        "outcomes": [          {            "id": "t1",            "condition": "user provided name",            "targetNodeId": "end"          }        ]      },      {        "id": "end",        "type": "end"      }    ]  }'
{
  "session": {
    "id": "string",
    "createdAt": 0,
    "startedAt": 0,
    "finishedAt": 0,
    "status": "created",
    "settings": {
      "clientReferenceId": "user-123",
      "metadata": {
        "source": "web-app",
        "department": "sales"
      },
      "initialPhrase": "string",
      "finalPhrase": "string",
      "providedData": {
        "property1": "string",
        "property2": "string"
      },
      "avatarId": "string",
      "langs": [
        "en",
        "es",
        "fr"
      ],
      "defaultLang": "en",
      "zone": "es",
      "modules": [
        {
          "type": "emailVerification",
          "name": "string",
          "email": "string",
          "publicRecognitionEnabled": true
        }
      ],
      "flow": [
        {
          "id": "string",
          "type": "start",
          "outcome": "string"
        }
      ]
    },
    "version": "string",
    "report": {
      "transcript": [
        {
          "id": "string",
          "createdAt": 0,
          "text": "string",
          "isAvatar": true
        }
      ],
      "aiAnalysis": {
        "ageMin": 0,
        "ageMax": 0,
        "sex": "male",
        "realPersonOrVirtual": "real",
        "overallSummary": "string",
        "analysis": [
          {
            "title": "string",
            "shortDescription": "string",
            "longDescription": "string"
          }
        ]
      },
      "location": {},
      "device": {},
      "livenessDetected": true,
      "lang": "string",
      "extractedData": {
        "property1": "string",
        "property2": "string"
      },
      "screenshots": [
        "string"
      ],
      "videos": {
        "avatarVideoUrl": "string",
        "userVideoUrl": "string"
      },
      "isVerified": true
    }
  },
  "clientSecret": {
    "secret": "string",
    "createdAt": 0,
    "expireAt": 0,
    "url": "string"
  }
}
{
  "error": {
    "type": "validation_error",
    "message": "Invalid request parameters"
  }
}
{
  "error": {
    "type": "authentication_error",
    "message": "Invalid API key provided"
  }
}
{
  "error": {
    "type": "rate_limit_error",
    "message": "Rate limit exceeded"
  }
}