The FACEIO REST API
Each FACEIO application is automatically assigned an API key. You can retrieve this key from the Application Manager on the FACEIO Console. The API key let you programmatically manage your application from your private backend environment, and using your favorite programming language as long as it supports HTTPS. The HTTP endpoints are built on TLS. Our API is RESTful and it:
- Uses built-in HTTP capabilities for passing parameters and authentication.
- Responds with standard HTTP response codes to indicate errors.
- Always returns
JSON
for each request whether successful or not.
Please note that API calls (REST HTTP Endpoints) and Widget instantiation (via the fio.js
JavaScript library) are totally unrelated. Widget instantiation (ie facial enrollment & authentication) occurs on the client side (user’s browser), is unmetered and unrestricted for all users while API calls must originate from your private application backend and is subject to quota & throttling (mostly Freemium plan). Refer to our Pricing Table for the REST API quota limits (if applicable).
API Access Point URL
The FACEIO API’s base endpoint is located at
https://api.faceio.net/
.The request URL scheme is
https://api.faceio.net/cmd?param=val¶m2=val2
wherecmd
is the API Endpoint you want to call andparam=val
are the endpoint parameters (if any). Each endpoint may handle bothGET
&POST
requests at the same time, and all our HTTP API Endpoints are exactly invoked the same way.Health & Status dashboard is located at status.faceio.net for real-time monitoring.
Summary
Access Point URL | api.faceio.net |
Health Check Endpoint | api.faceio.net/status |
Architecture | RESTFul |
HTTP & TLS Protocols Version | 1.1/2/3 (TLS 1.2/3 Enforced) |
Authentication | Key Based |
Network | Cloudflare |
HTTP Response MIME Type | application/json |
HTTP Status & Error Codes | See Below |
List of Endpoints | See Below |
Retrieve your API Key
When you create a new FACEIO application, you are given automatically an API key. Retrieving this API key is straightforward. Follow the steps below to fetch and manage your HTTP API key:
- Connect to your account via the FACEIO Console first.
- On the console main view, visit the Application Manager .
- Select the target application for which you want to retrieve your API key and/or gather analytics on your HTTP API calls.
- Navigate to the API key tab from the manager main view.
- You're all set. You can now copy your API key, make HTTP API calls, gather analytics, request quota increase, and so forth...
Authentication
You authenticate to the target FACEIO API endpoint by embedding your API key in the incoming HTTP request. Refer to the section above on how to retrieve and manage this API Key.
Authentication Methods
Authentication to the API occurs via two manners. Use the one you feel comfortable with:
HTTP Header | Embed your API Key in the WWW-Authenticate HTTP header of the incoming request as follows: |
Query Parameter | Or simply include your API key within your |
Do not forget to keep your API keys handy, and make sure they are used by authorized scripts only.
HTTP Responses, Status & Error Codes
The following HTTP status codes are always returned following each request. All API Endpoints, always returns application/json
for each request whether successful or not.
200 |
The target API endpoint executed the requested operation successfully. |
400 | Bad Request - Often missing a required parameter. |
401 | Unauthorized - Missing or Invalid API Key. |
404 | Not Found - The requested item (i.e. Facial ID) does not exist. |
405 | The HTTP method is not handled by this API endpoint. |
429 | Too many requests from this IP address/API Key. Refer to the Pricing Table for API Quota & Limits (if applicable). |
500 | Server Side Error or Maintenance Planned (We'll notify you anyway). |
REST API Endpoints
The following section enumerates all the exposed FACEIO REST API endpoints. Enhancements & new endpoints are added on each new release. This is the reference document you should follow. If you have any suggestion or feature request, please open a new support ticket via the FACEIO Console.
- deletefacialid - Delete a given Facial ID
- checkfacialid - Validate a given Facial ID
- setfacialidpayload - Set or change Payload data linked to a given Facial ID
- setfacialidpincode - Change PIN Code linked to a given Facial ID
- STAT - Gather application statistics
- ABOUT - API Server(s) copyright notice
- STATUS - API Server(s) health check
Endpoints Documentation
DELETEFACIALID
Endpoint Access URL | https://api.faceio.net/deletefacialid | ||||||||||||
Description | Programmtically delete (total purge), a Facial ID, its linked payload data, and associated biometrics hash from a given FACEIO application. The Facial ID is a Unique Identifier (UUID) assigned anonymously by the underlying Facial Recognition Engine to each enrolled user on your FACEIO application after his consent when he complete on-boarding on your application. You can learn more about the Facial ID on its dedicated page. Enrollment occurs via a single call to the enroll() method of the fio.js , facial recognition JavaScript library you already implemented on your website, web or mobile app. |
||||||||||||
Availability | All Plans | ||||||||||||
HTTP Method | GET | ||||||||||||
HTTP Parameters |
|
||||||||||||
HTTP Response |
application/json
|
Facial ID Deletion Python Code Sample
CHECKFACIALID
Endpoint Access URL | https://api.faceio.net/checkfacialid | ||||||||||||
Description | Perform authenticity check of a given Facial ID. In other words, make sure the supplied Facial ID is valid & registered on the FACEIO application linked to this API key. The Facial ID is a Unique Identifier (UUID) assigned anonymously by the underlying Facial Recognition Engine to each enrolled user on your FACEIO application after after his consent when he complete on-boarding on your application. You can learn more about the Facial ID on its dedicated page. Enrollment occurs via a single call to the enroll() method of the fio.js , facial recognition JavaScript library you already implemented on your website, web or mobile app. |
||||||||||||
Availability | Paid/Upgraded Plans Only. Refer to our Pricing Page for additional information. | ||||||||||||
HTTP Method | GET | ||||||||||||
HTTP Parameters |
|
||||||||||||
HTTP Response |
application/json
|
Check Facial ID Python Code Sample
setfacialidpayload
Endpoint Access URL | https://api.faceio.net/setfacialidpayload | ||||||||||||||||
Description | Set or change payload data linked to a particular enrolled user on your FACEIO application via its Facial ID. The supplied payload will be forwarded back to you (fio.js integration) upon successful, future authentication of this particular user. |
||||||||||||||||
Availability | Paid/Upgraded Plans Only. Refer to our Pricing Page for additional information. | ||||||||||||||||
HTTP Method | POST | ||||||||||||||||
HTTP Parameters |
|
||||||||||||||||
HTTP Response |
application/json
|
setfacialidpincode
Endpoint Access URL | https://api.faceio.net/setfacialidpincode | ||||||||||||||||
Description | Set or change the PIN code linked to a particular enrolled user on your FACEIO application via its Facial ID. | ||||||||||||||||
Availability | Paid/Upgraded Plans Only. Refer to our Pricing Page for additional information. | ||||||||||||||||
HTTP Method | POST | ||||||||||||||||
HTTP Parameters |
|
||||||||||||||||
HTTP Response |
application/json
|
Change PIN Code of a given Facial ID Python Code Sample
STAT
Endpoint Access URL | https://api.faceio.net/stat | |||||||||||||||
Description | Gather statistics on your active FACEIO application. Stats includes total indexed faces, total API calls, most recent indexed faces, etc. Please note that application stats are updated each 5 minutes. | |||||||||||||||
Availability | Paid/Upgraded Plans Only. Refer to our Pricing Page for additional information. | |||||||||||||||
HTTP Method | GET | |||||||||||||||
HTTP Parameters |
|
|||||||||||||||
HTTP Response |
application/json
|
ABOUT
Endpoint Access URL | https://api.faceio.net/about | |||||||||
Description | Return copyright notice and version information of the running FACEIO API server(s). | |||||||||
Availability | All Plans | |||||||||
HTTP Method | GET | |||||||||
HTTP Parameters | None | |||||||||
HTTP Response | application/json
|
STATUS
Endpoint Access URL | https://api.faceio.net/status | ||||||||||||
Description | Return health status information of the running FACEIO API server(s). Health status can also be monitored at real-time via status.faceio.net. | ||||||||||||
Availability | All Plans | ||||||||||||
HTTP Method | GET | ||||||||||||
HTTP Parameters | None | ||||||||||||
HTTP Response | application/json
|