Endpoint

The `Endpoint` entity.

Definition

TypeScript
interface Endpoint {
  id: string;
  apiId: string;
  method: "GET" | "POST" | "PUT" | "PATCH" | "DELETE";
  path: string;
  handlerType: "function" | "workflow" | "agent" | "swarm";
  handlerId: string;
  auth:
    | { kind: "public"; rateLimitPerMinute?: number | undefined }
    | { kind: "workspace_api_key" }
    | { kind: "oauth"; scope: string }
    | { kind: "event_signature"; secretSource: "secret_ref"; secretId: string }
    | null;
  cors: {
    allowOrigins: Array<string>;
    allowCredentials?: boolean | undefined;
  } | null;
  timeoutSeconds: number;
  enabled: boolean;
  createdAt: string;
  updatedAt: string;
}

Fields

FieldTypeNotes
idstringreadonly required
apiIdstringrequired — Parent api.
method"GET" | "POST" | "PUT" | "PATCH" | "DELETE"required — HTTP method this endpoint accepts (GET, POST, PUT, PATCH, DELETE).
pathstringrequired — Literal path relative to the api root, e.g. /checkout.
handlerType"function" | "workflow" | "agent" | "swarm"required — Kind of primitive bound as the handler (function, workflow, agent, or swarm).
handlerIdstringrequired — Prefixed ID of the bound primitive.
auth{ kind: "public"; rateLimitPerMinute?: number | undefined; } | { kind: "workspace_api_key"; } | { kind: "oauth"; scope: string; } | { kind: "event_signature"; secretSource: "secret_ref"; secretId: string; } | nullrequired — Per-endpoint auth override; null inherits from api.auth.
cors{ allowOrigins: Array<string>; allowCredentials?: boolean | undefined; } | nullrequired — Per-endpoint CORS override; null inherits from api.cors.
timeoutSecondsnumberrequired — Per-endpoint timeout in seconds (1–300). Hard cap on handler execution time.
enabledbooleanrequired — Whether the endpoint accepts traffic; false returns 503.
createdAtstringreadonly required — ISO-8601 timestamp of creation.
updatedAtstringreadonly required — ISO-8601 timestamp of the last update.