Documentation Index Fetch the complete documentation index at: https://mintlify.com/vemetric/vemetric/llms.txt
Use this file to discover all available pages before exploring further.
Get Project
GET https://api.vemetric.com/v1/project
Returns the data of the project associated with the provided API key.
Authentication
Requires a valid API key in the Authorization header. The project is automatically determined from the API key. See Authentication for details.
Request
No request body or query parameters required. The project is identified from the API key.
Response
Project data associated with the provided API key. Unique project identifier. Example: "4232882524803099"
Name of the project. Example: "Vemetric"
Primary domain of the project. Example: "vemetric.com"
Public token used for tracking events from the client-side SDK. This is different from your API key. The project token is safe to use in client-side code for event tracking, while the API key should only be used server-side.
Example: "project_token_123" Project creation timestamp in ISO 8601 format. Example: "2026-02-07T12:00:00.000Z"
Timestamp of the first ingested event, if available (ISO 8601 format). Will be null if no events have been tracked yet. Example: "2026-02-07T12:30:00.000Z"
Whether the project has public dashboard access enabled. Example: false
List of excluded IP addresses. Events from these IPs are not tracked. Example: ["127.0.0.1", "192.168.1.1"]
List of excluded countries as ISO 3166-1 alpha-2 codes. Events from these countries are not tracked. Example: ["DE", "AT"]
Example
Request
curl -X GET 'https://api.vemetric.com/v1/project' \
-H 'Authorization: Bearer vem_your_api_key_here'
Response
{
"project" : {
"id" : "4232882524803099" ,
"name" : "Vemetric" ,
"domain" : "vemetric.com" ,
"token" : "proj_abc123def456ghi789jkl012mno345" ,
"createdAt" : "2026-02-07T12:00:00.000Z" ,
"firstEventAt" : "2026-02-07T12:30:00.000Z" ,
"hasPublicDashboard" : false ,
"excludedIps" : [ "127.0.0.1" ],
"excludedCountries" : [ "DE" , "AT" ]
}
}
{
"error" : {
"code" : "UNAUTHORIZED" ,
"message" : "Invalid or revoked API key"
}
}
Use Cases
Verify API Key
Use this endpoint to verify that your API key is valid and retrieve the associated project details:
async function verifyApiKey ( apiKey ) {
try {
const response = await fetch ( 'https://api.vemetric.com/v1/project' , {
headers: { 'Authorization' : `Bearer ${ apiKey } ` }
});
if ( ! response . ok ) {
throw new Error ( 'Invalid API key' );
}
const { project } = await response . json ();
console . log ( `Connected to project: ${ project . name } ` );
return project ;
} catch ( error ) {
console . error ( 'API key verification failed:' , error );
throw error ;
}
}
Check Data Availability
Check if a project has any tracked events:
async function hasData ( apiKey ) {
const response = await fetch ( 'https://api.vemetric.com/v1/project' , {
headers: { 'Authorization' : `Bearer ${ apiKey } ` }
});
const { project } = await response . json ();
return project . firstEventAt !== null ;
}
Multi-Project Dashboard
If you’re building a dashboard that shows data from multiple projects, you can retrieve project details to display metadata:
const projects = [
{ apiKey: 'vem_project1_key' , displayName: 'Production' },
{ apiKey: 'vem_project2_key' , displayName: 'Staging' }
];
const projectDetails = await Promise . all (
projects . map ( async ({ apiKey , displayName }) => {
const response = await fetch ( 'https://api.vemetric.com/v1/project' , {
headers: { 'Authorization' : `Bearer ${ apiKey } ` }
});
const { project } = await response . json ();
return { ... project , displayName };
})
);
console . log ( projectDetails );
Notes
The token field in the response is the project token used for client-side event tracking. This is different from your API key:
API Key (vem_...): Used for server-side API requests, provides read access to analytics data. Keep this secret.
Project Token : Used in the client-side SDK to send events to Vemetric. Safe to expose in client-side code.
Project settings like excludedIps and excludedCountries are managed through the Vemetric dashboard. The API only provides read access to these settings.
Analytics Query Query analytics data for this project
Authentication Learn about API key authentication