Create a new server

This method allows you to create a new server.



Replace <projects> with the permalink of the project.

HTTP Method


Supported Parameters

  • name - Friendly name for your server
  • protocol_type - Connection protocol, either ftp, ftps, rackspace, s3 or ssh
  • server_path - Where on the server should your files be placed (for example, public_html/ or /absolute/path/here)
  • email_notify_on - When do you want to receive email notifications, either never, failure or always
  • root_path - The subdirectory in your repository that you wish to deploy. Leave blank to use the default specified in the project.
  • auto_deploy - Should auto deployments be enabled, either true or false
  • notification_email - Custom notification e-mail address, leave blank to use the user who started the deployment's address
  • branch - Branch to deploy from, leave blank to use the project default
  • environment - Production, Testing, Development etc. can be substituted into SSH commands.
  • server_group_identifier - The server group that this server belongs to

In addition to the above parameters, the following parameters are available depending on the protocol selected:


  • hostname
  • username
  • password
  • port
  • passive
  • force_hidden_files


In addition the the FTP parameters the following parameters are available for FTPS servers.

  • implicit
  • ignore_certificate_errors


  • hostname
  • username
  • password
  • port
  • use_ssh_keys

Amazon S3

  • bucket_name
  • access_key_id
  • secret_access_key

Rackspace Cloud

  • username
  • api_key
  • region
  • container_name

Example cURL Request

curl -H "Content-type: application/json" \
-H "Accept: application/json" \
--user adam@atechmedia.com:my-api-key \
-d { \
  "server" : { \
    "name": "Development", \
    "protocol_type" : "ftp", \
    "hostname": "localhost", \
    "username": "deployhq", \
    "password": "test" \
  } \
} \

Example Response

    "identifier": "19bdc2ea-1c96-e09f-f3bf-4473990841b7",
    "name": "Development",
    "protocol_type": "ssh",
    "server_path": "",
    "auto_deploy_url": "https://test.deployhq.com/deploy/project/to/development/fewfwef",
    "last_revision": null,
    "preferred_branch": "master", // preferred_branch will be the branch on this server if set, or the default branch for the repository if unset.
    "branch": null,
    "notify_email": null,
    "server_group_identifier": null,
    "hostname": "",
    "username": "root",
    "port": 22,
    "host_key": "...."