---
title: "Create SFTP Account"
method: POST
path: "/v0/sftp-accounts"
tags: ["SFTP Accounts"]
---

# Create SFTP Account

`POST /v0/sftp-accounts`

Create a new SFTP Account.

## Request body

- SftpAccountPostRequest
  - `name` string, required — The name of the SFTP Account
  - `host` string, required — The SFTP server host address
  - `port` integer — The SFTP server port number (defaults to 22)
  - `username` string, required — The user that should be used to connect to the SFTP server
  - `credentials` union, required — One of password or ssh_private_key is required
    - object
      - `password` string, required
    - object
      - `ssh_private_key` string, required

## Response `200`

The request has succeeded.

- SftpAccountResource
  - `name` string — The name of the SFTP Account
  - `host` string — The SFTP server host address
  - `port` integer — The SFTP server port number (defaults to 22)
  - `username` string — The user that should be used to connect to the SFTP server
  - `id` integer
  - `has_password` boolean
  - `has_ssh_private_key` boolean

## Other responses

- `400` — Bad request

---

[API](https://skmtc.net/oneschema/apis/templates.md) · [All operations](https://skmtc.net/oneschema/apis/templates/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/oneschema/templates/revisions/40674aa6d4d9/schema)
