diff --git a/src/api.ts b/src/api.ts
index 87f862994e761d4eb81b97a7ffa11baa0d6f54ab..103aa5d890eaedba549b0c38d05baeeda98d8e09 100644
--- a/src/api.ts
+++ b/src/api.ts
@@ -1,5 +1,13 @@
 import { Endpoints } from './endpoints';
 
+export type APIError = {
+	id: string;
+	code: string;
+	message: string;
+	kind: 'client' | 'server';
+	info: Record<string, any>;
+};
+
 export function request<E extends keyof Endpoints>(
 	origin: string,
 	endpoint: E,