🎉 @facesmash/sdk v0.1.0 is now available on npm — Read the docs →
FaceSmash Docs
API Reference

API Overview

FaceSmash REST API for server-side face recognition operations

Base URL

https://api.facesmash.app/v1

The REST API is currently in development. The endpoints below describe the planned API surface. The current backend uses PocketBase for data storage. A public REST API with API key authentication is coming soon.

Authentication

All API requests require an API key passed in the Authorization header:

curl https://api.facesmash.app/v1/faces/verify \
  -H "Authorization: Bearer fs_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"descriptor": [0.1, 0.2, ...]}'

See Authentication for details on obtaining and managing API keys.

Endpoints

Faces

MethodEndpointDescription
POST/v1/faces/registerRegister a new face
POST/v1/faces/verifyVerify a face against a specific user (1:1)
POST/v1/faces/identifyIdentify a face against all users (1:N)
POST/v1/faces/detectDetect and analyze face quality
GET/v1/faces/templates/:userIdGet stored templates for a user
DELETE/v1/faces/templates/:templateIdDelete a specific template

Users

MethodEndpointDescription
GET/v1/usersList all registered users
GET/v1/users/:idGet a user profile
DELETE/v1/users/:idDelete a user and all their biometric data
GET/v1/users/:id/logsGet sign-in history

Webhooks

MethodEndpointDescription
POST/v1/webhooksCreate a webhook
GET/v1/webhooksList webhooks
DELETE/v1/webhooks/:idDelete a webhook

Response Format

All responses follow a consistent JSON format:

{
  "success": true,
  "data": { ... },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2026-03-08T00:00:00.000Z"
  }
}

Error Responses

{
  "success": false,
  "error": {
    "code": "NO_FACE_DETECTED",
    "message": "No face was detected in the provided image",
    "details": {}
  },
  "meta": {
    "requestId": "req_abc123",
    "timestamp": "2026-03-08T00:00:00.000Z"
  }
}

Rate Limits

PlanRequests/minRequests/month
Free101,000
Pro10050,000
EnterpriseUnlimitedUnlimited

Rate limit headers are included in every response:

X-RateLimit-Limit: 100
X-RateLimit-Remaining: 97
X-RateLimit-Reset: 1709856000

On this page