Skip to content
WP EngineDocumentation

Create SFTP user

POST
/installs/{install_id}/sftp_users
curl --request POST \
--url https://api.wpengineapi.com/v1/installs/294deacc-d8b8-4005-82c4-0727ba8ddde0/sftp_users \
--header 'Authorization: Basic <credentials>' \
--header 'Content-Type: application/json' \
--data '{ "name": "developer", "password": "SecurePass123!", "path": "/www/wp-content" }'

Creates a new SFTP user for the install. The username is automatically prefixed with the install name (e.g., input developer becomes install-developer).

Username, Password, and Path Rules

Username: Alphanumeric characters, hyphens, and underscores only. With the install-name prefix, the final username cannot exceed 32 characters.

Password: 8–64 characters. Cannot contain “wpengine” or the install name.

Path: Cannot contain .. (directory traversal sequences).

Password Handling

The password is supplied in the request and is never returned in the response. The client must store the password securely after creation, as it cannot be retrieved later.

Limitations & Warnings

  • Not available for Autoscale accounts. Returns 403 for Autoscale accounts.
install_id
required
string format: uuid

ID of install

Example

294deacc-d8b8-4005-82c4-0727ba8ddde0
Media typeapplication/json
object
name
required

Username to create (will be prefixed with install name)

string

Example

developer
password
required

Password for the user

string

Example

SecurePass123!
path

(Optional) SFTP path for the user

string
nullable

Example

/www/wp-content

Returns the created SftpUser object.

Media typeapplication/json

SFTP user credentials for an install

object
name
required

Full SFTP username (auto-prefixed with install name)

string
path
required

SFTP path for the user

string
nullable

Example

{
"name": "install-developer",
"path": "/www/wp-content"
}

Bad Request

Media typeapplication/json
object
message
required

A message regarding the error that occurred on the server

string
documentation_url

(Optional) A URL where documentation regarding this specific error can be found

string
errors

An array of error objects describing specific errors that arose when servicing the request

Array<object>
object
resource
required

The name of the resource that was being processed when the error occurred

string
field
required

(Optional) The specific field associated with the error

string
type
required

(Optional) A type associated with the error. invalid_value, access_error, value_unavailable

string
code
required

(Optional) A machine code relating to the error that occurred with the field and resource

string
message
required

(Optional) A human-readable message relating to the error that occurred with the field and resource

string

Example

{
"message": "Invalid request.",
"errors": [
{
"resource": "Resource",
"field": "field_name",
"type": "invalid_value",
"code": "invalid",
"message": "The value is invalid."
}
]
}

Authentication Error

Media typeapplication/json
object
message
required

A message regarding the error that occurred on the server

string
documentation_url

(Optional) A URL where documentation regarding this specific error can be found

string

Example

{
"message": "Bad Credentials"
}

Not authorized (install not found, no access, or Autoscale account)

Media typeapplication/json
object
message
required

A message regarding the error that occurred on the server

string
documentation_url

(Optional) A URL where documentation regarding this specific error can be found

string

Example

{
"message": "You don't have permission to perform that action"
}

Too many requests

Internal Server Error

Media typeapplication/json
object
message
required

A message regarding the error that occurred on the server

string

Example

{
"message": "An unexpected error occurred, please try again in a few minutes"
}

An invalid response was received from an upstream server

Service unavailable