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 via HTTP without requiring a DuckDB + MotherDuck client to be running.
All of the methods are authenticated using the token of a user with the Admin
role within your MotherDuck Organization
and passing it via 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 instance configuration. For a detailed walkthrough, please see our Service Accounts Guide.
If you would like to generate your own OpenAPI client the spec file is located at https://api.motherduck.com/docs/specs
📄️ Get user instances
Gets instance configuration for a user. Requires 'Admin' role.
📄️ Set user instance
Configure user-specific settings, such as instance types for service accounts. See the Service Accounts Guide for context.
📄️ Create new user
Create a new user, typically a service account, within your MotherDuck organization.
📄️ Create an access token
Create an access token for a user, including service accounts.
📄️ Invalidate an 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
📄️ Get active accounts
[Preview] Get active accounts in an organization along with active ducklings per account. Requires 'Admin' role