Skip to main content
POST
/
api
/
workers
/
{workerId}
/
deployments
/
chat-embed
JavaScript
import BrainbaseLabs from 'brainbase-labs';

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

const embed = await client.workers.deployments.chat.embed.create('workerId', {
  flowId: 'flowId',
  name: 'name',
});

console.log(embed.id);
{
  "id": "<string>",
  "embedId": "<string>",
  "welcomeMessage": "<string>",
  "agentName": "<string>",
  "agentLogoUrl": "<string>",
  "primaryColor": "<string>",
  "styling": {}
}

Authorizations

x-api-key
string
header
required

API key authentication

Path Parameters

workerId
string
required

Body

application/json
name
string
required
flowId
string
required
flowVersionId
string
welcomeMessage
string
agentName
string
agentLogoUrl
string
primaryColor
string
styling
object

Response

Chat embed deployment created

id
string
required
embedId
string
required
welcomeMessage
string | null
agentName
string | null
agentLogoUrl
string | null
primaryColor
string | null
styling
object