Skip to content

Integrations endpoints

14 endpoints at https://api.vaif.studio, generated from the API's OpenAPI document. The REST API page covers authentication, and All endpoints lists every group.

GET /integrations/events

List the events a project's webhooks and analytics can receive

Response 200 (application/json)
{
  groups: {
    id: string;
    label: string;
    events: {
      name: string;
      description: string;
    }[];
  }[];
  testEvent: string;
}

POST /integrations/subscriptions

Create an integration subscription

Request body (application/json, required)
{
  projectId: string (uuid);
  envId?: string (uuid);
  type: "webhook" | "analytics" | "slack" | "discord";
  name: string;
  enabled?: boolean;
  config: {
    url?: string (uri);
    headers?: {
      [key: string]: string;
    };
    secret?: string;
    provider?: "google_analytics" | "posthog" | "mixpanel";
    apiKey?: string;
    projectId?: string;
    measurementId?: string;
    apiSecret?: string;
    host?: "https://us.i.posthog.com" | "https://eu.i.posthog.com" | "https://app.posthog.com" | "https://eu.posthog.com";
    region?: "us" | "eu";
  };
  eventFilter?: {
    allow?: string[];
  };
}
Response 200 (application/json)
{
  ok: true;
  subscription: {
    id: string;
    projectId: string;
    envId?: string | null;
    type: string;
    name: string;
    config?: any;
    eventFilter?: any;
    createdAt?: string | string (date-time);
    updatedAt?: string | string (date-time);
  };
}

Errors: 400, 401, 403, 404, 500, with the error body.

GET /integrations/subscriptions/project/{projectId}

List integration subscriptions for a project

ParameterInTypeRequired
projectIdpathstring (uuid)Yes
Response 200 (application/json)
{
  subscriptions: {
    id: string;
    projectId: string;
    envId?: string | null;
    type: string;
    name: string;
    config?: any;
    eventFilter?: any;
    createdAt?: string | string (date-time);
    updatedAt?: string | string (date-time);
  }[];
}

Errors: 401, 403, 404, 500, with the error body.

PATCH /integrations/subscriptions/{id}

Update an integration subscription

ParameterInTypeRequired
idpathstring (uuid)Yes
Request body (application/json, required)
{
  name?: string;
  enabled?: boolean;
  config?: {
    url?: string (uri);
    headers?: {
      [key: string]: string;
    };
    secret?: string;
    provider?: "google_analytics" | "posthog" | "mixpanel";
    apiKey?: string;
    projectId?: string;
    measurementId?: string;
    apiSecret?: string;
    host?: "https://us.i.posthog.com" | "https://eu.i.posthog.com" | "https://app.posthog.com" | "https://eu.posthog.com";
    region?: "us" | "eu";
  };
  eventFilter?: {
    allow?: string[];
  };
}
Response 200 (application/json)
{
  ok: true;
  subscription: {
    id: string;
    projectId: string;
    envId?: string | null;
    type: string;
    name: string;
    config?: any;
    eventFilter?: any;
    createdAt?: string | string (date-time);
    updatedAt?: string | string (date-time);
  };
}

Errors: 400, 401, 403, 404, 500, with the error body.

DELETE /integrations/subscriptions/{id}

Delete an integration subscription

ParameterInTypeRequired
idpathstring (uuid)Yes
Response 200 (application/json)
{
  ok: true;
}

Errors: 401, 403, 404, 500, with the error body.

GET /integrations/deliveries/subscription/{subscriptionId}

List deliveries for a subscription

ParameterInTypeRequired
subscriptionIdpathstring (uuid)Yes
Response 200 (application/json)
{
  deliveries: any[];
}

Errors: 401, 403, 404, 500, with the error body.

GET /integrations/deliveries/event/{eventId}

List deliveries for an event

ParameterInTypeRequired
eventIdpathstring (uuid)Yes
Response 200 (application/json)
{
  deliveries: any[];
}

Errors: 400, 401, 403, 404, 500, with the error body.

POST /integrations/subscriptions/{id}/test

Send a test event to an integration subscription

ParameterInTypeRequired
idpathstring (uuid)Yes
Response 200 (application/json)
{
  ok: true;
}

Errors: 401, 403, 404, 500, with the error body.

GET /integrations/dlq/project/{projectId}

List failed deliveries (DLQ) for a project

ParameterInTypeRequired
projectIdpathstring (uuid)Yes
Response 200 (application/json)
{
  deliveries: any[];
}

Errors: 401, 403, 500, with the error body.

GET /integrations/deliveries/project/{projectId}

List a project's webhook and analytics deliveries with filters

ParameterInTypeRequired
statusquerystringNo
subscriptionIdquerystring (uuid)No
typequery"webhook" | "analytics" | "slack" | "discord"No
qquerystringNo
sincequerystring (date-time)No
untilquerystring (date-time)No
limitquerynumberNo
offsetquerynumberNo
envIdquerystringNo
projectIdpathstring (uuid)Yes
Response 200 (application/json)
{
  deliveries: {
    id: string;
    status: string;
    attemptCount: number;
    responseStatus: number | null;
    responseBody: string | null;
    errorMessage: string | null;
    durationMs: number | null;
    createdAt: string;
    lastAttemptAt: string | null;
    nextAttemptAt: string | null;
    subscription: {
      id: string;
      name: string;
      type: string;
      provider: string | null;
    };
    event: {
      id: string;
      type: string | null;
    };
  }[];
  total: number;
}

Errors: 400, 401, 403, with the error body.

GET /integrations/deliveries/project/{projectId}/summary

Summarize a project's deliveries (24 h, 7 days, per subscription)

ParameterInTypeRequired
envIdquerystringNo
projectIdpathstring (uuid)Yes
Response 200 (application/json)
{
  deliveries24h: number;
  firstAttemptRate: number | null;
  failedForGood7d: number;
  p95ResponseMs: number | null;
  slowest: {
    subscriptionId: string;
    name: string;
    p95Ms: number;
  } | null;
  subscriptions: {
    subscriptionId: string;
    deliveries24h: number;
    failures24h: number;
    lastDelivery: {
      at: string;
      status: string;
      responseStatus: number | null;
    } | null;
  }[];
  retention: string;
}

Errors: 401, 403, 404, with the error body.

POST /integrations/deliveries/{deliveryId}/retry

Retry a failed webhook delivery

A delivery in a production environment re-sends production traffic: it needs allowProduction: true (body or query) and a project owner or admin.

ParameterInTypeRequired
notqueryanyNo
allowProductionquery"true" | "false"No
deliveryIdpathstring (uuid)Yes
Request body (application/json, required)
any | {
  allowProduction?: boolean;
} | null
Response 200 (application/json)
{
  ok: true;
}

Errors: 401, 403, 404, 500, with the error body.

GET /integrations/analytics/project/{projectId}/stats

ParameterInTypeRequired
projectIdpathstringYes
Response 200 (application/json)
{
  totalEvents: number;
  successCount: number;
  failureCount: number;
  successRate: number;
  failureRate: number;
  eventsByProvider: { [key: string]: any };
  recentDeliveries: any[];
} | {
  totalEvents: number;
  successCount: number;
  failureCount: number;
  successRate: number;
  failureRate: number;
  eventsByProvider: {
    [key: string]: number;
  };
  recentDeliveries: {
    id: string;
    subscriptionId: string;
    eventId: string;
    status: string;
    attemptCount: number;
    lastAttemptAt: null | string (date-time);
    nextAttemptAt: null | string (date-time);
    responseStatus: null | number;
    responseBody: null | string;
    errorMessage: null | string;
    durationMs: null | number;
    createdAt: string (date-time);
  }[];
}

GET /integrations/analytics/project/{projectId}/events

ParameterInTypeRequired
projectIdpathstringYes
Response 200 (application/json)
{
  events: any[];
  total: number;
} | {
  events: {
    responseBody: null | string;
    errorMessage: null | string;
    id: any;
    eventId: any;
    eventName: any;
    source: any;
    provider: any;
    subscriptionName: any;
    status: any;
    attemptCount: any;
    responseStatus: any;
    durationMs: any;
    createdAt: any;
    lastAttemptAt: any;
  }[];
  total: number;
}