create_site

POST /v1/kya/sites creates a site: a public key for the snippet and the script tag that carries it.

Paste the snippet it returns into your pages; see the Quickstart. List your origins so only your pages can report.

POST
/v1/kya/sites

Creates a site: a public key (gpk_…) for the snippet and the script tag that carries it. The key is not a secret; it goes in your pages. An organization can have 50 sites.

Request body

application/json

FieldTypeDescription
namestring

Optional. A name for people to recognize the site by.

originsarray of string

Optional. The origins whose pages reports are taken from, each a scheme and host such as https://www.example.com; up to 20. With none, reports are taken from any page. See Origins.

Responses

The site, with its script tag.

FieldTypeDescription
idstring

The site's id, kst_….

namestring

Its name. Empty if none was given.

keystring

Its public key, gpk_…: the data-site of the script tag. Not a secret.

originsarray of string

The origins reports are taken from. Empty means any page.

snippetstring

The script tag to paste into your pages. Only when the site is created.

created_atstring

When the site was created.

request_idstring

req_…, the same as the X-Request-Id header.

Examples

Example Request
curl -X POST 'https://api.finic.ai/v1/kya/sites' \  -H "Authorization: Bearer $FINIC_API_KEY" \  -H 'Content-Type: application/json' \  -d '{  "name": "Storefront",  "origins": [    "https://www.example.com"  ]}'
Example Response
{  "id": "kst_01M4Z1X3G5P8D2F6J0YA4SMQNC",  "name": "Storefront",  "key": "gpk_Zk3vQ8mT1xR7bN2cYw5LpA9d",  "origins": [    "https://www.example.com"  ],  "snippet": "<script async src=\"https://api.finic.ai/kya/agent.js\" data-site=\"gpk_Zk3vQ8mT1xR7bN2cYw5LpA9d\"></script>",  "created_at": "2026-12-01T17:01:52.310447Z",  "request_id": "req_01M4Z1X3H2N7Q4B8D6KC9TWEFA"}