> For the complete documentation index, see [llms.txt](https://developers.make.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.make.com/make-sdk/make-endpoints-sdk.md).

# Make Endpoints SDK

{% hint style="warning" %}
Endpoints are in **closed beta**. Make must [enable Endpoints for your organization](https://tally.so/r/0Q2149) before you can call them.
{% endhint %}

Use the Make Endpoints SDK to call an app action directly from JavaScript or TypeScript. Instead of building a scenario for an individual call, select an app Endpoint, provide its input, and run it with a Make connection where required.

`@makehq/endpoints-sdk`  includes the `make-endpoints-cli`  and requires installing the TypeScript SDK alongside it.

To manage Make resources such as scenarios and teams, use the [Make TypeScript SDK](/make-sdk/make-typescript-sdk.md). The Endpoints SDK uses that SDK's `Make` client for authentication and HTTP requests.

### Before you begin

You need:

* Node.js 24 or 26, as supported by the current package.
* Endpoints enabled for your Make organization.
* A Make API key with `endpoints:run` and access to the selected team.
* Your Make zone and team ID.
* A compatible Make connection for an Endpoint that requires authentication. Its connection type and granted provider scopes must match the Endpoint's requirements.

The Make API key authenticates your request to Make. The connection ID identifies the connection used to access the app. Don’t put an app’s credentials in the Endpoint’s input.

### Install the SDK

Install the Endpoints SDK and its Make SDK peer dependency:

```bash
npm install @makehq/endpoints-sdk @makehq/sdk
```

### Call an Endpoint

To call an Endpoint, store your API key, zone, and team ID in environment variables, such as `MAKE_API_KEY`, `MAKE_ZONE`, and `MAKE_TEAM_ID`. Create a `Make` client with the API key and zone. Call the Endpoint with its input. If the Endpoint uses a connection, also pass the connection ID.

#### Example

This example retrieves a Google Docs document through an existing Google connection in Make. To run it:

1. Set `MAKE_API_KEY`, `MAKE_ZONE`, and `MAKE_TEAM_ID` as environment variables.
2. Set `MAKE_CONNECTION_ID` to the ID of your Google connection.
3. Set `GOOGLE_DOC_ID` to the ID of the document you want to retrieve.
4. Copy the following code into a file named `get-document.mjs`:

```javascript
   import { Make } from '@makehq/sdk';
   import { SdkTransport } from '@makehq/endpoints-sdk';
   import { GoogleDocsV1Sdk } from '@makehq/endpoints-sdk/apps/google-docs/v1';

   const apiKey = process.env.MAKE_API_KEY;
   const zone = process.env.MAKE_ZONE;
   const teamId = Number(process.env.MAKE_TEAM_ID);
   const connectionId = Number(process.env.MAKE_CONNECTION_ID);
   const documentId = process.env.GOOGLE_DOC_ID;

   if (!apiKey || !zone || !documentId) {
     throw new Error('Set MAKE_API_KEY, MAKE_ZONE, and GOOGLE_DOC_ID.');
   }
   if (!Number.isSafeInteger(teamId) || teamId <= 0 ||
       !Number.isSafeInteger(connectionId) || connectionId <= 0) {
     throw new Error('Set positive MAKE_TEAM_ID and MAKE_CONNECTION_ID values.');
   }

   const make = new Make(apiKey, zone);
   const docs = new GoogleDocsV1Sdk({
     transport: new SdkTransport(make),
     teamId,
   });
   const document = await docs.endpoints.getDocument({
     connectionId,
     input: { documentId, filter: 'image' },
   });
   console.log(JSON.stringify(document, null, 2));
```

The input includes `filter`, which this Endpoint's input type requires.

4. In the folder that contains the file, run the script:

```bash
   node get-document.mjs
```

The script prints the document as JSON in your terminal. The output contains the document’s content, so keep it out of public logs.

### Choose an import

Import only the clients your application needs. In the table below, the last two rows use Google Docs as an example. For another app, replace `google-docs` and `GoogleDocs` with that app’s name.

| Import                                                             | Use                             |
| ------------------------------------------------------------------ | ------------------------------- |
| `EndpointsSdk` from `@makehq/endpoints-sdk`                        | All generated app clients       |
| `GoogleDocsSdk` from `@makehq/endpoints-sdk/apps/google-docs`      | All bundled versions of one app |
| `GoogleDocsV1Sdk` from `@makehq/endpoints-sdk/apps/google-docs/v1` | One specific app version        |

`SdkTransport` is exported from the package root. App paths use the app's package name, such as `google-docs`, rather than its JavaScript property name.

Generated methods resolve directly to the Endpoint's output. The lower-level `sdk.execute(pointer, options)` method can call an Endpoint by name and returns the envelope `{ output }`. Use it only when you know the correct app, version, Endpoint name, and input contract.

### Discover Endpoints and use them with agents

The `@makehq/endpoints-sdk` package also includes the `make-endpoints-cli` command.&#x20;

To view the Endpoints included in the package, run `list`. To view one Endpoint's definition, run `describe` with the app, version, and Endpoint name. For example:

```bash
npx --package=@makehq/endpoints-sdk make-endpoints-cli list
npx --package=@makehq/endpoints-sdk make-endpoints-cli describe google-docs v1 get-document
```

Run `list` and `describe` before you choose Endpoints for your agent. They don't check your connections, so an Endpoint in the output might not be one your team can run. Give your agent only the Endpoints the task needs.

If your agent runs in JavaScript or TypeScript, import `EndpointTools` from `@makehq/endpoints-sdk/tools`. For example, this script finds the tool for the Google Docs `get-document` Endpoint and prints its definition:

```javascript
import { EndpointTools } from '@makehq/endpoints-sdk/tools';

const tool = EndpointTools.find(
  (candidate) => candidate.name === 'google-docs_get-document',
);

if (!tool) throw new Error('The document-read tool is not in this package.');

console.log(JSON.stringify({
  name: tool.name,
  description: tool.description,
  inputSchema: tool.inputSchema,
  annotations: tool.annotations,
}, null, 2));
```

### Resources

* [npm: @makehq/endpoints-sdk](https://www.npmjs.com/package/@makehq/endpoints-sdk)
* [GitHub: make-endpoints-sdk](https://github.com/integromat/make-endpoints-sdk)
* [Make TypeScript SDK](/make-sdk/make-typescript-sdk.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developers.make.com/make-sdk/make-endpoints-sdk.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
