Skip to main content

Bot Endpoint

POST /admin/projects/:projectId/bot

Creates a new Medplum Bot. Posting to this endpoint creates a Bot resource and a corresponding ProjectMembership resource.

Parameters

{
name: string;
description?: string;
accessPolicy?: Reference<AccessPolicy>;
}

Example request

await medplum.post('admin/projects/:projectId/bot', {
name: 'Hello World Bot',
description: 'Hello world',
accessPolicy: {
reference: 'AccessPolicy/access-policy-id',
},
});

Example Response

{
resourceType: 'Bot',
name: 'Hello World Bot',
description: 'Hello world',
runtimeVersion: 'awslambda',
sourceCode: {
contentType: 'text/typescript',
title: 'index.ts',
url: 'Binary/:uuid'
},
id: ':bot-uuid',
meta: {
project: ':projectId',
//...
},
}