---
updatedAt: 2026-05-22T00:42:24.000Z
agentTools:
  projectIndex: https://docs.oneschema.co/llms.txt
---

# Create SFTP Account

Create a new SFTP Account.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "SFTP Accounts",
    "version": "0.0.1",
    "contact": {
      "name": "OneSchema Support",
      "email": "support@oneschema.co"
    },
    "license": {
      "name": "proprietary",
      "url": "https://www.oneschema.co/terms-and-conditions"
    },
    "termsOfService": "https://www.oneschema.co/terms-and-conditions",
    "description": "An API for managing OneSchema SFTP Accounts."
  },
  "tags": [
    {
      "name": "SFTP Accounts",
      "description": "SFTP Accounts"
    }
  ],
  "paths": {
    "/v0/sftp-accounts": {
      "post": {
        "operationId": "create-sftp-account",
        "summary": "Create SFTP Account",
        "description": "Create a new SFTP Account.",
        "parameters": [],
        "responses": {
          "200": {
            "description": "The request has succeeded.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/sftp-account-resource"
                }
              }
            }
          },
          "400": {
            "description": "Bad request",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/error-response"
                }
              }
            }
          }
        },
        "tags": [
          "SFTP Accounts"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/sftp-account-post-request"
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "components": {
    "schemas": {
      "error-response": {
        "type": "object",
        "properties": {
          "error": {
            "type": "string"
          }
        }
      },
      "sftp-account-password": {
        "type": "object",
        "required": [
          "password"
        ],
        "properties": {
          "password": {
            "type": "string"
          }
        }
      },
      "sftp-account-post-request": {
        "type": "object",
        "required": [
          "name",
          "host",
          "username",
          "credentials"
        ],
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the SFTP Account"
          },
          "host": {
            "type": "string",
            "description": "The SFTP server host address"
          },
          "port": {
            "type": "integer",
            "minimum": 1,
            "maximum": 65535,
            "description": "The SFTP server port number (defaults to 22)",
            "default": 22
          },
          "username": {
            "type": "string",
            "description": "The user that should be used to connect to the SFTP server"
          },
          "credentials": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/sftp-account-password"
              },
              {
                "$ref": "#/components/schemas/sftp-account-ssh-private-key"
              }
            ],
            "description": "One of password or ssh_private_key is required",
            "type": "object"
          }
        }
      },
      "sftp-account-resource": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "description": "The name of the SFTP Account"
          },
          "host": {
            "type": "string",
            "description": "The SFTP server host address"
          },
          "port": {
            "type": "integer",
            "minimum": 1,
            "maximum": 65535,
            "description": "The SFTP server port number (defaults to 22)",
            "default": 22
          },
          "username": {
            "type": "string",
            "description": "The user that should be used to connect to the SFTP server"
          },
          "id": {
            "type": "integer"
          },
          "has_password": {
            "type": "boolean"
          },
          "has_ssh_private_key": {
            "type": "boolean"
          }
        }
      },
      "sftp-account-ssh-private-key": {
        "type": "object",
        "required": [
          "ssh_private_key"
        ],
        "properties": {
          "ssh_private_key": {
            "type": "string"
          }
        }
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-KEY"
      }
    }
  },
  "servers": [
    {
      "url": "https://api.oneschema.co",
      "description": "Production server (hosted in the US)",
      "variables": {}
    },
    {
      "url": "https://api.eu.oneschema.co",
      "description": "Production server (hosted in the EU)",
      "variables": {}
    },
    {
      "url": "https://api.ca.oneschema.co",
      "description": "Production server (hosted in Canada)",
      "variables": {}
    },
    {
      "url": "https://api.au.oneschema.co",
      "description": "Production server (hosted in Australia)",
      "variables": {}
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```