Docs

Create an analytics connection

Add a hosted connection or validate and save a custom server. Only team owners can create connections. Retry a known failed hosted setup with the same name to resume its saved project; an unknown creation outcome requires operator reconciliation.

POST
/projects/{projectId}/analytics/connections

Authorization

Authorization
header
string
required

Enter the team access token with the Bearer prefix, e.g. "Bearer team_access_token"

Path Parameters

projectId
string
required

The owning Chunkify project ID.

Bodyapplication/json

Analytics connection settings.

name
string
required

Name identifies this connection in the dashboard.

type
string
required

Type specifies whether Chunkify manages the analytics project.

Available options:
hostedcustom
endpoint
string

Endpoint specifies the custom server base URL. Required for custom connections and omitted for hosted connections.

public_ingest_key
string

PublicIngestKey optionally enables preview tracking for a custom connection. Supply the public ingestion key for the same analytics project as read_key. It is returned in connection reads and used in browser code. Omit for hosted connections.

Pattern:
^(ck_public_[a-f0-9]{64})?$
read_key
string

ReadKey supplies a read-only project credential for a custom connection. Required for custom connections and omitted for hosted connections. Stored encrypted and never returned.

Responses

application/json
data
object
required
status
"success"
string
required
public_key
string

PublicKey is the hosted ingestion key. It remains available as public_ingest_key on the connection. Omitted for custom connections.

Success.