MotherDuck REST API
The REST API methods are in 'Preview' and may change in the future
To better support scenarios that require some flexibility or dynamic configuration around managing a MotherDuck organization we are exposing an OpenAPI endpoint with some new functionality. At the moment it enables limited management of users and tokens through HTTP without requiring a DuckDB + MotherDuck client to be running.
All of the methods are authenticated using a Read/Write token of a user with the Admin role within your MotherDuck Organization
and passing it through the Authorization header with a value of Bearer {TOKEN}.
You can use this REST API to programmatically manage service accounts, including their creation, token generation, and Duckling configuration. For a detailed walkthrough, see Create and configure service accounts.
If you would like to generate your own OpenAPI client the spec file is located at https://api.motherduck.com/docs/specs
Create a Dive embed session
Creates an embed session for the specified Dive.
Get active accounts
[Preview] Get active accounts in an organization along with active Ducklings per account. Requires 'Admin' role
Get user Duckling configuration
Gets Duckling (instance) configuration for a user. Requires 'Admin' role.
Set user Duckling configuration
Sets Duckling (instance) configuration for a user. Requires 'Admin' role
Create new user
Create user is restricted to creating a user with a 'Member' role
Create an access token for a user
Create an access token for a user
Invalidate a user access token
Invalidate a user access token
Delete a user
Permanently delete a user and all of their data. THIS CANNOT BE UNDONE
List a user's access tokens
List a user's access tokens