POST
/
v2
/
workspaces
import Honcho from '@honcho-ai/core';

const client = new Honcho({
  apiKey: process.env['HONCHO_API_KEY'], // This is the default and can be omitted
});

const workspace = await client.workspaces.getOrCreate({ id: 'id' });

console.log(workspace.id);
{
  "id": "<string>",
  "metadata": {},
  "configuration": {},
  "created_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Workspace creation parameters

Response

200
application/json

Successful Response

The response is of type object.