> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stateset.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Sftp save

> Tested mailbox saved; production pickup remains gated by partner readiness

### Path parameters

**partner\_id** `string` *required*

Trading partner identifier

### Request body

`MailboxInput`

**host** `string` *required*

**host\_key** `string` *required*

**inbound\_dir** `string` *required*

**mailbox\_policy** `MailboxPolicy`

**MailboxPolicy**

**delete\_after\_ack** `boolean`

Delete only after durable processing and successful acknowledgment publication. Invalid or uncertain files remain on the server for operator review. Default: `false`.

**inbound\_prefixes** `string[]`

Empty uses .edi/.x12/.txt; otherwise only these case-sensitive prefixes. Default: `[]`.

**outbound\_prefixes** `object`

Agreed document codes, keyed by X12 set (including 997/999/TA1). When nonempty, a missing code fails acceptance instead of inventing a name. Default: `&#123;&#125;`. Additional keys map to values of type `string`.

**poll\_interval\_seconds** `integer (int32)`

Default: `10`. Minimum: `0`.

**outbound\_dir** `string` *required*

**password** `string,null`

**port** `integer (int32)` *required*

Minimum: `0`.

**private\_key\_pem** `string,null`

**user** `string` *required*

### Response

No response body. Tested mailbox saved; production pickup remains gated by partner readiness.

### Status codes

| Code | Meaning |
| - | - |
| `200` | Tested mailbox saved; production pickup remains gated by partner readiness |

### Using this contract

Read the [source OpenAPI document](/spec/edi.json) for declared schemas and alternatives.
This page also includes documented corrections from the [spec overlays](https://github.com/stateset/docs/tree/main/spec/overlays).
Example IDs and values are illustrative; replace them with records from your workspace.

```bash cURL theme={null}
curl --silent --show-error --fail-with-body --request POST \
  --url 'https://api.edi.stateset.com/v1/connections/sftp/{partner_id}' \
  --header "Authorization: Bearer $EDI_API_TOKEN" \
  --header 'Content-Type: application/json' \
  --data '{
  "host": "string",
  "host_key": "string",
  "inbound_dir": "string",
  "mailbox_policy": {
    "delete_after_ack": false,
    "inbound_prefixes": [],
    "outbound_prefixes": {},
    "poll_interval_seconds": 10
  },
  "outbound_dir": "string",
  "password": "YOUR_API_KEY",
  "port": 1,
  "private_key_pem": "string",
  "user": "string"
}'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.