# Save SFTP/FTP external storage configuration

Endpoint: POST /externalStorage/sftp
Version: 3.0.0
Security: bearerAuth, apiKeyAuth

## Security:

  - `bearerAuth` (unknown)
    http bearer Token

  - `apiKeyAuth` (unknown)
    apiKey in header Key

## Request fields (application/json):

  - `name` (string, required)
    Configuration name

  - `host` (string, required)
    Host name or IP

  - `port` (integer, required)
    Port number

  - `user` (string, required)
    User name

  - `password` (string)
    Password for authentication

  - `privateKey` (string)
    Private key for key-based SFTP authentication

  - `publicKey` (string)
    Public key

  - `pathPrefix` (string)
    Remote path prefix

  - `protocol` (string)

  - `additional` (object)
    Additional protocol-specific configuration

## Response 200:

  - `200` (unknown)
    Success

## Response 200 fields (application/json):

  - `id` (string)
    External source id

  - `name` (string)
    Configuration name

  - `host` (string)
    Host name or IP

  - `port` (integer)
    Port number

  - `user` (string)
    User name

  - `password` (string)

  - `privateKey` (string)

  - `publicKey` (string)
    Public key

  - `pathPrefix` (string)
    Remote path prefix

  - `protocol` (string)

  - `additional` (object)
    Additional protocol-specific configuration

  - `ownerUserId` (integer)
    Owner user id from the linked external source

## Response 400:

  - `400` (unknown)
    Bad request

## Response 400 fields (application/json):

  - `data` (object)

  - `errors` (array)

  - `errors.id` (string, required)
    24-character hex ObjectId

  - `errors.code` (integer, required)

  - `errors.message` (string, required)
    Dotted error key (e.g. account.not.found)

  - `metadata` (object)

## Response 401:

  - `401` (unknown)
    Missing or invalid authentication

## Response 401 fields (application/json):

  - `data` (object)

  - `errors` (array)

  - `errors.id` (string, required)
    24-character hex ObjectId

  - `errors.code` (integer, required)

  - `errors.message` (string, required)
    Dotted error key (e.g. account.not.found)

  - `metadata` (object)

## Response 403:

  - `403` (unknown)
    Insufficient permissions

## Response 403 fields (application/json):

  - `data` (object)

  - `errors` (array)

  - `errors.id` (string, required)
    24-character hex ObjectId

  - `errors.code` (integer, required)

  - `errors.message` (string, required)
    Dotted error key (e.g. account.not.found)

  - `metadata` (object)

## Response 404:

  - `404` (unknown)
    Resource not found

## Response 404 fields (application/json):

  - `data` (object)

  - `errors` (array)

  - `errors.id` (string, required)
    24-character hex ObjectId

  - `errors.code` (integer, required)

  - `errors.message` (string, required)
    Dotted error key (e.g. account.not.found)

  - `metadata` (object)

