> For the complete documentation index, see [llms.txt](https://docs.eesel.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.eesel.ai/apis-and-developer-resources/network-access.md).

# Network Access

Network Access lets your agent reach APIs you don't have a built-in integration for. You allow a domain, tell it which header to authenticate with, and your agent can then look up live data like orders, shipping status or inventory, and use it when it answers.

<figure><img src="/files/kfYtDqAp562LJ4zAdDrm" alt="The Network Access section in agent settings with two allowlisted domains, and the note that credentials are stored as headers and never shown to the AI"><figcaption><p>Network Access in your agent's settings. Note the line at the top: credentials are stored as headers and never shown to the AI.</p></figcaption></figure>

## What you can do

* Fetch live data from any REST API (orders, customers, inventory, shipping, etc.)
* Make GET, POST, PATCH and DELETE requests to retrieve data or trigger actions
* Attach authentication headers (API keys, Bearer tokens, Basic auth) per domain
* Combine with any helpdesk so the agent responds with real-time data

{% hint style="success" %}
**Your teammate can walk you through this.** Describe the API you want it to reach and it will tell you exactly what to add, which domain to allow, and which header the API expects.

**Never paste an API key, token or password into the chat.** You don't need to, and you shouldn't. Your teammate will point you at the field in your settings where the value goes, and it never sees the value itself, only the name of the header. If it ever asks you for a secret in chat, don't give it one.
{% endhint %}

## Setting up Network Access

{% stepper %}
{% step %}

### Add the domain

Open your agent, go to the **Settings** tab, scroll to **Network Access**, and click **Add domain**. Enter the base domain of the API, like `api.yourservice.com`. Pasting a full URL works too; the hostname is taken from it.

<details>

<summary>Allowing all subdomains with a wildcard</summary>

Use `*.yourservice.com` to match `api.yourservice.com`, `store.yourservice.com`, and so on. The wildcard doesn't match the bare `yourservice.com` itself, so add that separately if you need it.

</details>
{% endstep %}

{% step %}

### Add the authentication header

Fill in the header name and value the API expects, then click **Save**. Header name and value must be filled in together; to allow a domain with no auth, leave both empty.

<details>

<summary>Bearer token</summary>

| Field        | Value                 |
| ------------ | --------------------- |
| Header name  | `Authorization`       |
| Header value | `Bearer YOUR_API_KEY` |

The word `Bearer` and the space after it are part of the value.

</details>

<details>

<summary>Basic auth</summary>

Basic Auth encodes your credentials as base64. Most APIs expect `username:password`, or `api_key:` with an empty password.

Generate the value (the trailing colon is required):

```bash
echo -n "YOUR_API_KEY:" | base64
```

| Field        | Value                        |
| ------------ | ---------------------------- |
| Header name  | `Authorization`              |
| Header value | `Basic <your base64 output>` |

</details>

<details>

<summary>Custom API key header</summary>

Some APIs use their own header name instead of `Authorization`:

| Field        | Value          |
| ------------ | -------------- |
| Header name  | `X-API-Key`    |
| Header value | `YOUR_API_KEY` |

</details>
{% endstep %}

{% step %}

### Tell your agent how to use it

All that's left is telling your agent what these API connections are for, and the easiest way is to just talk to it: describe the workflow you want ("when a customer asks about an order, look it up by order number and reply with the status and tracking"), and it writes the rule into its own [instructions](/instructions-and-memory/instructions-and-memory.md).

The same connections work everywhere your agent does: in [automations](/automations-and-schedules/automations-and-schedules.md), in [skills](/skills/custom-skills.md), and in ad-hoc requests in chat. Auth headers are attached automatically from your policies, so credentials never appear in instructions.
{% endstep %}
{% endstepper %}

## Troubleshooting

<details>

<summary>"Header name and value need to be filled in together"</summary>

Both fields must be filled in before saving. If you want to allow a domain without any auth headers, leave both fields empty.

</details>

<details>

<summary>"Outbound request to 'api.example.com' is not allowed"</summary>

The domain isn't in your Network Access policies. Check that the policy holds the hostname exactly (`api.yourservice.com`, not a full URL with a path), and that you clicked **Save** after adding it.

</details>

<details>

<summary>The API returns 401 Unauthorized</summary>

For Basic Auth, make sure you ran `echo -n "key:" | base64` with the trailing colon. For Bearer tokens, the value must start with `Bearer` followed by a space. And check the key is still valid in the third-party dashboard.

</details>

## Related

* [Custom Skills](/skills/custom-skills.md) for building a skill that uses an API you've allowed here
* [Instructions and Memory](/instructions-and-memory/instructions-and-memory.md) for telling your agent when to make a request
* [The eesel CLI](/apis-and-developer-resources/cli.md) for managing agents and integrations from your terminal


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.eesel.ai/apis-and-developer-resources/network-access.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
