Overview
Workspaces endpointsAvailable Operations
- list - List workspaces
- create - Create a workspace
- delete - Delete a workspace
- get - Get a workspace
- update - Update a workspace
- listBudgets - List workspace budgets
- deleteBudget - Delete a workspace budget
- setBudget - Create or update a workspace budget
- listMembers - List workspace members
- bulkAddMembers - Bulk add members to a workspace
- bulkRemoveMembers - Bulk remove members from a workspace
list
List all workspaces for the authenticated user. Management key required.Example Usage
import { OpenRouter } from "@openrouter/sdk";
const openRouter = new OpenRouter({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const result = await openRouter.workspaces.list();
for await (const page of result) {
console.log(page);
}
}
run();
Standalone function
The standalone function version of this method:import { OpenRouterCore } from "@openrouter/sdk/core.js";
import { workspacesList } from "@openrouter/sdk/funcs/workspacesList.js";
// Use `OpenRouterCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const openRouter = new OpenRouterCore({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const res = await workspacesList(openRouter);
if (res.ok) {
const { value: result } = res;
for await (const page of result) {
console.log(page);
}
} else {
console.log("workspacesList failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListWorkspacesRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.ListWorkspacesResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | */* |
create
Create a new workspace for the authenticated user. Management key required.Example Usage
import { OpenRouter } from "@openrouter/sdk";
const openRouter = new OpenRouter({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const result = await openRouter.workspaces.create({
createWorkspaceRequest: {
defaultImageModel: "openai/dall-e-3",
defaultProviderSort: "price",
defaultTextModel: "openai/gpt-4o",
description: "Production environment workspace",
name: "Production",
slug: "production",
},
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:import { OpenRouterCore } from "@openrouter/sdk/core.js";
import { workspacesCreate } from "@openrouter/sdk/funcs/workspacesCreate.js";
// Use `OpenRouterCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const openRouter = new OpenRouterCore({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const res = await workspacesCreate(openRouter, {
createWorkspaceRequest: {
defaultImageModel: "openai/dall-e-3",
defaultProviderSort: "price",
defaultTextModel: "openai/gpt-4o",
description: "Production environment workspace",
name: "Production",
slug: "production",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workspacesCreate failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.CreateWorkspaceRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.CreateWorkspaceResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.ForbiddenResponseError | 403 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | */* |
delete
Delete an existing workspace. The default workspace cannot be deleted. Workspaces with active API keys cannot be deleted; remove the keys first. Management key required.Example Usage
import { OpenRouter } from "@openrouter/sdk";
const openRouter = new OpenRouter({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const result = await openRouter.workspaces.delete({
id: "production",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:import { OpenRouterCore } from "@openrouter/sdk/core.js";
import { workspacesDelete } from "@openrouter/sdk/funcs/workspacesDelete.js";
// Use `OpenRouterCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const openRouter = new OpenRouterCore({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const res = await workspacesDelete(openRouter, {
id: "production",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workspacesDelete failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.DeleteWorkspaceRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.DeleteWorkspaceResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.ForbiddenResponseError | 403 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | */* |
get
Get a single workspace by ID or slug. Management key required.Example Usage
import { OpenRouter } from "@openrouter/sdk";
const openRouter = new OpenRouter({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const result = await openRouter.workspaces.get({
id: "production",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:import { OpenRouterCore } from "@openrouter/sdk/core.js";
import { workspacesGet } from "@openrouter/sdk/funcs/workspacesGet.js";
// Use `OpenRouterCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const openRouter = new OpenRouterCore({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const res = await workspacesGet(openRouter, {
id: "production",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workspacesGet failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.GetWorkspaceRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.GetWorkspaceResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | */* |
update
Update an existing workspace by ID or slug. Management key required.Example Usage
import { OpenRouter } from "@openrouter/sdk";
const openRouter = new OpenRouter({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const result = await openRouter.workspaces.update({
id: "production",
updateWorkspaceRequest: {
name: "Updated Workspace",
slug: "updated-workspace",
},
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:import { OpenRouterCore } from "@openrouter/sdk/core.js";
import { workspacesUpdate } from "@openrouter/sdk/funcs/workspacesUpdate.js";
// Use `OpenRouterCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const openRouter = new OpenRouterCore({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const res = await workspacesUpdate(openRouter, {
id: "production",
updateWorkspaceRequest: {
name: "Updated Workspace",
slug: "updated-workspace",
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workspacesUpdate failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.UpdateWorkspaceRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.UpdateWorkspaceResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.ForbiddenResponseError | 403 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | */* |
listBudgets
List all budgets configured for a workspace. Management key required.Example Usage
import { OpenRouter } from "@openrouter/sdk";
const openRouter = new OpenRouter({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const result = await openRouter.workspaces.listBudgets({
id: "production",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:import { OpenRouterCore } from "@openrouter/sdk/core.js";
import { workspacesListBudgets } from "@openrouter/sdk/funcs/workspacesListBudgets.js";
// Use `OpenRouterCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const openRouter = new OpenRouterCore({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const res = await workspacesListBudgets(openRouter, {
id: "production",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workspacesListBudgets failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListWorkspaceBudgetsRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.ListWorkspaceBudgetsResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | */* |
deleteBudget
Remove the budget for a given interval. Management key required.Example Usage
import { OpenRouter } from "@openrouter/sdk";
const openRouter = new OpenRouter({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const result = await openRouter.workspaces.deleteBudget({
id: "production",
interval: "monthly",
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:import { OpenRouterCore } from "@openrouter/sdk/core.js";
import { workspacesDeleteBudget } from "@openrouter/sdk/funcs/workspacesDeleteBudget.js";
// Use `OpenRouterCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const openRouter = new OpenRouterCore({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const res = await workspacesDeleteBudget(openRouter, {
id: "production",
interval: "monthly",
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workspacesDeleteBudget failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.DeleteWorkspaceBudgetRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.DeleteWorkspaceBudgetResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | */* |
setBudget
Create or update the budget for a given interval. Budget limits must strictly decrease as the interval narrows (lifetime > monthly > weekly > daily). Management key required.Example Usage
import { OpenRouter } from "@openrouter/sdk";
const openRouter = new OpenRouter({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const result = await openRouter.workspaces.setBudget({
id: "production",
interval: "monthly",
upsertWorkspaceBudgetRequest: {
limitUsd: 100,
},
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:import { OpenRouterCore } from "@openrouter/sdk/core.js";
import { workspacesSetBudget } from "@openrouter/sdk/funcs/workspacesSetBudget.js";
// Use `OpenRouterCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const openRouter = new OpenRouterCore({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const res = await workspacesSetBudget(openRouter, {
id: "production",
interval: "monthly",
upsertWorkspaceBudgetRequest: {
limitUsd: 100,
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workspacesSetBudget failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.UpsertWorkspaceBudgetRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.UpsertWorkspaceBudgetResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | */* |
listMembers
List all members of a workspace. Returns paginated results. For the default workspace, returns all organization members (implicit membership). Management key required.Example Usage
import { OpenRouter } from "@openrouter/sdk";
const openRouter = new OpenRouter({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const result = await openRouter.workspaces.listMembers({
id: "production",
});
for await (const page of result) {
console.log(page);
}
}
run();
Standalone function
The standalone function version of this method:import { OpenRouterCore } from "@openrouter/sdk/core.js";
import { workspacesListMembers } from "@openrouter/sdk/funcs/workspacesListMembers.js";
// Use `OpenRouterCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const openRouter = new OpenRouterCore({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const res = await workspacesListMembers(openRouter, {
id: "production",
});
if (res.ok) {
const { value: result } = res;
for await (const page of result) {
console.log(page);
}
} else {
console.log("workspacesListMembers failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.ListWorkspaceMembersRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<operations.ListWorkspaceMembersResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.ForbiddenResponseError | 403 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | */* |
bulkAddMembers
Add multiple organization members to a workspace. Members are assigned the same role they hold in the organization. Management key required.Example Usage
import { OpenRouter } from "@openrouter/sdk";
const openRouter = new OpenRouter({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const result = await openRouter.workspaces.bulkAddMembers({
id: "production",
bulkAddWorkspaceMembersRequest: {
userIds: [
"user_abc123",
"user_def456",
],
},
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:import { OpenRouterCore } from "@openrouter/sdk/core.js";
import { workspacesBulkAddMembers } from "@openrouter/sdk/funcs/workspacesBulkAddMembers.js";
// Use `OpenRouterCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const openRouter = new OpenRouterCore({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const res = await workspacesBulkAddMembers(openRouter, {
id: "production",
bulkAddWorkspaceMembersRequest: {
userIds: [
"user_abc123",
"user_def456",
],
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workspacesBulkAddMembers failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.BulkAddWorkspaceMembersRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.BulkAddWorkspaceMembersResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.ForbiddenResponseError | 403 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | */* |
bulkRemoveMembers
Remove multiple members from a workspace. Members with active API keys in the workspace cannot be removed. SCIM-managed members cannot be removed; changes must be made in your identity provider. Management key required.Example Usage
import { OpenRouter } from "@openrouter/sdk";
const openRouter = new OpenRouter({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const result = await openRouter.workspaces.bulkRemoveMembers({
id: "production",
bulkRemoveWorkspaceMembersRequest: {
userIds: [
"user_abc123",
"user_def456",
],
},
});
console.log(result);
}
run();
Standalone function
The standalone function version of this method:import { OpenRouterCore } from "@openrouter/sdk/core.js";
import { workspacesBulkRemoveMembers } from "@openrouter/sdk/funcs/workspacesBulkRemoveMembers.js";
// Use `OpenRouterCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const openRouter = new OpenRouterCore({
httpReferer: "<value>",
appTitle: "<value>",
appCategories: "<value>",
apiKey: process.env["OPENROUTER_API_KEY"] ?? "",
});
async function run() {
const res = await workspacesBulkRemoveMembers(openRouter, {
id: "production",
bulkRemoveWorkspaceMembersRequest: {
userIds: [
"user_abc123",
"user_def456",
],
},
});
if (res.ok) {
const { value: result } = res;
console.log(result);
} else {
console.log("workspacesBulkRemoveMembers failed:", res.error);
}
}
run();
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
request | operations.BulkRemoveWorkspaceMembersRequest | :heavy_check_mark: | The request object to use for the request. |
options | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
options.fetchOptions | RequestInit | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed. |
options.retries | RetryConfig | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
Response
Promise<models.BulkRemoveWorkspaceMembersResponse>Errors
| Error Type | Status Code | Content Type |
|---|---|---|
| errors.BadRequestResponseError | 400 | application/json |
| errors.UnauthorizedResponseError | 401 | application/json |
| errors.ForbiddenResponseError | 403 | application/json |
| errors.NotFoundResponseError | 404 | application/json |
| errors.InternalServerResponseError | 500 | application/json |
| errors.OpenRouterDefaultError | 4XX, 5XX | */* |