Links between API Key Module and Other Modules
This document showcases the module links defined between the API Key Module and other Commerce Modules.
Summary#
The API Key Module has the following links to other modules:
First Data Model | Second Data Model | Type | Description |
|---|---|---|---|
Stored - many-to-many |
Sales Channel Module#
You can create a publishable API key and associate it with a sales channel. Medusa defines a link between the ApiKey and the SalesChannel data models.

This is useful to avoid passing the sales channel's ID as a parameter of every request, and instead pass the publishable API key in the header of any request to the Store API route.
Learn more about this in the Sales Channel Module's documentation.
Retrieve with Query
To retrieve the sales channels of an API key with Query, pass sales_channels.* in fields:
Manage with Link#
To manage the sales channels of an API key, use Link: