UI Inspect
API Reference

Integrations

API endpoints for GitHub, Figma, and notification integrations.

GitHub integration

github.list

List all GitHub integrations for the authenticated user.

TypeQuery
AuthProtected

github.create

Connect a GitHub repository to a project.

TypeMutation
AuthProtected

Input:

{
  projectId: string;
  owner: string; // GitHub org or username
  repo: string; // Repository name
  accessToken: string; // GitHub PAT with repo scope
}

github.postPRComment

Post or update a comment on a pull request.

TypeMutation
AuthProtected

Input:

{
  integrationId: string;
  pullNumber: number;
  body: string;              // Markdown comment body
  commentId?: number;        // Update existing comment
}

Response:

{
  commentId: number;
  url: string;
  updated: boolean; // true if existing comment was updated
}

github.postStatus

Post a commit status check.

TypeMutation
AuthProtected

Input:

{
  integrationId: string;
  commitSha: string;
  state: "pending" | "success" | "failure" | "error";
  description: string;
  targetUrl?: string;
}

github.verify

Verify a GitHub integration is still valid.

TypeMutation
AuthProtected

Input: { id: string }

Response:

{
  connected: boolean;
  repoName?: string;
  private?: boolean;
  error?: string;
}

Figma integration

figma.connect

Connect a Figma file to a project.

TypeMutation
AuthProtected

Input:

{
  projectId: string;
  accessToken: string; // Figma personal access token
  fileKey: string; // From the Figma file URL
}

figma.listFrames

List all frames in a connected Figma file.

TypeQuery
AuthProtected

Input: { integrationId: string }

Response:

{
  fileName: string;
  frames: Array<{
    id: string;
    name: string;
    pageName: string;
    width: number;
    height: number;
  }>;
}

figma.exportFrame

Export a Figma frame as an image for comparison.

TypeMutation
AuthProtected

Input:

{
  integrationId: string;
  nodeId: string; // Figma node ID
  scale: number; // 0.5 to 4
  format: "png" | "svg" | "jpg";
}

Response:

{
  imageUrl: string;
  nodeId: string;
}

Notifications

notification.list

TypeQuery
AuthProtected

Input: { unreadOnly?: boolean }

notification.unreadCount

TypeQuery
AuthProtected

Returns: number

notification.markRead / markAllRead

TypeMutation
AuthProtected

Notification types: comparison_complete, comparison_failed, fixes_ready, fixes_applied, member_joined, member_removed, project_created, general

On this page