Endpoints overview
Endpoints are serverless functions that form the API for your extension. They allow you to dynamically do things such as:
- create an environment variable on a Netlify site
- proxy calls to a third-party API with authentication tokens
- store configuration or metadata in the Extension API
- add or remove a build event handler for a site
Endpoints can be called through the extension UI and through build event handlers.
Want to inject functions into a user’s site instead?
This document covers how to use serverless functions in your extension but you also have the option to inject serverless functions that will run in the extension user’s site instead. Learn more about function injection.
You can use the Netlify SDK commands to run, test, and build your extension as you work.
Once you publish your extension, it will be available for Netlify users to install on their teams.
Documentation
- Get started: how to generate the boilerplate and add the basic scaffolding for an endpoint in your extension.
- Values & methods: overview of data available to your endpoint, and the methods and properties you can use in your code.
- Debug & test: how to test your endpoint locally.
- Call endpoints from extension UI: how to call an endpoint through the extension UI.
- tRPC integration: how to use the SDK’s tRPC integration to write end-to-end type-safe queries.