> For the complete documentation index, see [llms.txt](https://docs.couchdrop.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.couchdrop.io/managed-file-transfer/as2/connect-to-external-as2.md).

# Connect to external AS2

Learn about connecting to external AS2 providers with Couchdrop

## Introduction

Couchdrop supports outbound AS2 connections for securely sending files to external AS2 partners.

Once configured, the AS2 connection appears in Couchdrop as a virtual folder. Files uploaded to that folder are packaged as AS2 messages, encrypted, signed where configured, and sent to your trading partner.

{% hint style="info" %}
This page covers outbound AS2 connections. To receive files over AS2, see [Inbound AS2 Stations](/managed-file-transfer/as2/as2-stations.md).
{% endhint %}

### How it works

Unlike storage-based connections, an outbound AS2 connection is designed for sending messages rather than browsing remote files.

The connection appears in Couchdrop as an outbound [virtual folder](/how-couchdrop-works.md). You can upload files to this folder, but operations such as listing files on the remote AS2 system or downloading files from it are not supported.

When a file is uploaded to the AS2 folder, Couchdrop packages it into an AS2 message, applies the configured encryption and signing, and sends it to the external AS2 endpoint.

## How to connect to an external AS2 partner

{% hint style="warning" %}

### Before you start

To connect to an external AS2 partner, you will generally need:

* Access to Couchdrop with the appropriate permissions
* Your trading partner's **AS2 ID**
* Your trading partner's **AS2 endpoint URL**
* Your trading partner's **public certificate**
* Your **public and private signing certificate/key pair**
  {% endhint %}

{% stepper %}
{% step %}

### Create an outbound AS2 connection

In Couchdrop, create a new connection and select **Outbound AS2** from the list of available connections.

Configure the connection name and virtual folder name.
{% endstep %}

{% step %}

### Configure the AS2 partner

Enter your trading partner's AS2 configuration details, including their **AS2 ID** and **AS2 endpoint URL**.

Upload the trading partner's public certificate.
{% endstep %}

{% step %}

### Configure message signing

Under **Message Signature Configuration**, upload your public certificate and private key.

These credentials are used when signing outbound AS2 messages sent to your partner.
{% endstep %}

{% step %}

### Save and test the connection

Once created, the AS2 connection will appear as a virtual folder in Couchdrop. Upload a test file to confirm it can be delivered successfully to your AS2 partner.
{% endstep %}
{% endstepper %}

***

## Using outbound AS2 in Couchdrop workflows

Because the AS2 connection appears as an outbound virtual folder, other Couchdrop features can use it as a destination.

| Feature                   | How it works with outbound AS2                                                         |
| ------------------------- | -------------------------------------------------------------------------------------- |
| **Inbound SFTP and FTPS** | Files uploaded by SFTP or FTPS users can be sent to the AS2 connection.                |
| **Mailboxes**             | Email attachments received through a Mailbox can be sent to the AS2 partner.           |
| **Upload Links**          | Files received through an Upload Link can be routed to the AS2 connection.             |
| **Inbound Webhooks**      | Files received through an inbound HTTPS webhook can be sent to the AS2 partner.        |
| **Inbound AS2**           | Files received through an inbound AS2 Station can be forwarded to another AS2 partner. |
| **S3 Gateway**            | Files received through the S3 Gateway can be sent to the AS2 connection.               |
| **Automations**           | Use the AS2 virtual folder as an outbound destination in Couchdrop Automations.        |


---

# 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://docs.couchdrop.io/managed-file-transfer/as2/connect-to-external-as2.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.
