NAV
API Documentation

Introduction

The Pressable API is a REST based API. We accept form-encoded request bodies and return JSON encoded responses. Our API is used by our customers for building custom user interfaces and automating day-to-day operations.

All of our examples are shown using curl. We recommend using Postman for testing your API interactions.

Authentication

OAuth authentication using a provided client id and client secret, which are supplied in the control panel.

Obtain Access Token

Request

curl --location --request POST 'https://my.pressable.com/auth/token' \
--form 'grant_type="password"' \
--form 'email="johndoe@pressable.dev"' \
--form 'password="securepassword123"' \
--form 'client_id="QbWIe7vxfNzZ1vZ7_YFIDNm_NCD7b5X43A68QX4qfzk"' \
--form 'client_secret="V8uqwz5sL0PdNVm8MUNo5WfdGdm_s1g4BMYSVF47H4k"'

Authentication provides an access token in the response that is required for making requests to the API. Access tokens are active for 1-hour. To be able to continue making requests after token expiration you must use a refresh token to get a new access token.

The access token provided in the response must be supplied in the standard HTTP Authorization header as Bearer token authentication to make requests to the API.

Authorization: "Bearer <bearer-token>"

POST Data

grant_type (required)
value is always 'password'
email (required)
account email address
password (required)
account password
client_id (required)
client_secret (required)

Response

{
    "access_token": "ib3Y0nfqfi9pzWDlpcHmr-j4U3NPdiMFoCmtalKjVyg",
    "token_type": "Bearer",
    "refresh_token": "rKBf_JvBWncc7dRp9kbXkh-2wH3GOJQU5AL6GD7sL9I",
    "scope": "authorized",
    "created_at": 1645029287,
    "id": 2,
    "name": "John Doe",
    "email": "johndoe@pressable.dev",
    "gravatar": "https://www.gravatar.com/avatar/80bc49eb0d067d6a185990b1a97f6452?d=mp",
    "scopes": [
        "authorized",
        "admin",
        "owner"
    ]
}

Request New Access Token

Request

curl --location --request POST 'https://my.pressable.com/auth/token' \
--form 'grant_type="refresh_token"' \
--form 'refresh_token="rKBf_JvBWncc7dRp9kbXkh-2wH3GOJQU5AL6GD7sL9I"' \
--form 'client_id="QbWIe7vxfNzZ1vZ7_YFIDNm_NCD7b5X43A68QX4qfzk"' \
--form 'client_secret="V8uqwz5sL0PdNVm8MUNo5WfdGdm_s1g4BMYSVF47H4k"' \

A refresh token can be used to be able to continue to make additional requests to the API after your access token has expired.

A refresh token is obtained initially within the response of the authentication request for an access token.

POST Data

grant_type (required)
value is always 'refresh_token'
refresh_token (required)
obtained in authentication response
client_id (required)
client_secret (required)

Response

{
    "access_token": "F-piwSMTor9L1nvM1mtf_j8uVI9KmLL-1qHh7WXREq4",
    "token_type": "Bearer",
    "refresh_token": "ArzAnztl87UJJJ7lmxQ0tHB5iGw1DiWV4k0eUNLencE",
    "scope": "authorized admin owner",
    "created_at": 1645029862,
    "id": 2,
    "name": "John Doe",
    "email": "johndoe@pressable.dev",
    "gravatar": "https://www.gravatar.com/avatar/80bc49eb0d067d6a185990b1a97f6452?d=mp",
    "scopes": [
        "authorized",
        "admin",
        "owner"
    ]
}

Revoke Access Token

Request

curl --location --request POST 'https://my.pressable.com/auth/revoke' \
--form 'token="F-piwSMTor9L1nvM1mtf_j8uVI9KmLL-1qHh7WXREq4"' \
--form 'client_id="QbWIe7vxfNzZ1vZ7_YFIDNm_NCD7b5X43A68QX4qfzk"' \
--form 'client_secret="V8uqwz5sL0PdNVm8MUNo5WfdGdm_s1g4BMYSVF47H4k"' \

Revoke an access token to stop the access token from being able to make API requests.

POST Data

token (required)
access token being revoked
client_id (required)
client_secret (required)

Response

No response body

Account

Get current account profile information and settings.

Request

curl --location --request GET 'https://my.pressable.com/v1/account' \
--header 'Authorization: Bearer cjh02WI6u4j4QpKZeKFCAGF9uLINWTXlj9y8DnJskv4'

Parameters

No parameters

Response

{
    "message": "Success",
    "data": {
        "affiliate": false,
        "collaboratorCount": 0,
        "email": "johndoe@pressable.dev",
        "gravatar": "https://www.gravatar.com/avatar/80bc49eb0d067d6a185990b1a97f6452?d=mp",
        "maxSites": 10,
        "name": "John Doe",
        "organization": "Personal",
        "pageViews": {
            "allTime": {
                "people": 0,
                "views": 0
            },
            "currentMonth": {
                "people": 0,
                "views": 0
            },
            "lastMonth": {
                "people": 0,
                "views": 0
            },
            "today": {
                "people": 0,
                "views": 0
            },
            "twoMonthsAgo": {
                "people": 0,
                "views": 0
            },
            "yesterday": {
                "people": 0,
                "views": 0
            }
        },
        "phoneNumber": "5551111510",
        "preview": false,
        "productName": "Pro",
        "sitesCount": 1308,
        "defaultPhpVersion": "8.0",
        "recent_activity": [
            {
                "created": "2022-01-31T20:05:29.000Z",
                "createdBy": {
                    "id": 2,
                    "created": "2022-01-31T20:05:29.000Z",
                    "email": "johndoe@pressable.dev",
                    "name": "John Doe",
                    "phoneNumber": "5551111510",
                    "organization": null,
                    "gravatar": "https://www.gravatar.com/avatar/80bc49eb0d067d6a185990b1a97f6452?d=mp"
                },
                "type": "Account",
                "message": "Test Event 10"
            },
            {
                "created": "2022-01-31T20:05:29.000Z",
                "createdBy": {
                    "id": 2,
                    "created": "2022-01-31T20:05:29.000Z",
                    "email": "johndoe@pressable.dev",
                    "name": "John Doe",
                    "phoneNumber": "5551111510",
                    "organization": null,
                    "gravatar": "https://www.gravatar.com/avatar/80bc49eb0d067d6a185990b1a97f6452?d=mp"
                },
                "type": "Account",
                "message": "Test Event 9"
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Set Account PHP Version

Set a default PHP version for all new sites created in your account.

Valid PHP Versions:8.0 and 8.1

Request

curl --location --request PUT 'https://my.pressable.com/v1/account' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw' \
--header 'Content-Type: application/json' \
--data-raw '{
  "php_version": "8.0"
}'

Parameters

php_version (required)
8.0 and 8.1

Response

{
  "message": "string",
  "data": {
    "affiliate": true,
    "collaboratorCount": 0,
    "email": "string",
    "gravatar": "string",
    "maxSites": 0,
    "name": "string",
    "organization": "string",
    "pageViews": {
      "allTime": {
        "people": 0,
        "views": 0
      },
      "currentMonth": {
        "people": 0,
        "views": 0
      },
      "lastMonth": {
        "people": 0,
        "views": 0
      },
      "today": {
        "people": 0,
        "views": 0
      },
      "twoMonthsAgo": {
        "people": 0,
        "views": 0
      },
      "yesterday": {
        "people": 0,
        "views": 0
      }
    },
    "phoneNumber": "string",
    "preview": true,
    "productName": "string",
    "sitesCount": 0,
    "recentActivity": [
      {
        "created": "string",
        "createdBy": {
          "id": 0,
          "created": "string",
          "email": "string",
          "name": "string",
          "phoneNumber": "string",
          "organization": "string",
          "gravatar": "string"
        },
        "type": "string",
        "message": "string"
      }
    ],
    "defaultPhpVersion": "string"
  },
  "errors": [
    "string"
  ]
}

Responses

Number
Message
Code
200
Success

Collaborators

Get a list of collaborators. This will return all the collaborators that are attached to your sites, plus any instances of you being a collaborator on a site.

Request

curl --location --request GET 'https://my.pressable.com/v1/collaborators' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw'

Parameters

No parameters

Response

{
    "message": "Success",
    "data": [
        {
            "id": 2,
            "created": "2022-01-31T20:05:39.000Z",
            "updated": "2022-01-31T20:05:39.000Z",
            "accountId": 4,
            "email": "tomdoe@pressable.dev",
            "siteId": 1,
            "state": "active",
            "wpUsername": "tom",
            "name": "Tom Doe",
            "siteName": "my-presssable-net"
        },
        {
            "id": 757,
            "created": "2022-01-31T20:05:39.000Z",
            "updated": "2022-01-31T20:05:39.000Z",
            "accountId": 5,
            "email": "clairedoe@pressable.dev",
            "siteId": 14,
            "state": "active",
            "wpUsername": "johndoe",
            "name": "Claire Doe",
            "siteName": "jittery-crib-4894d78ee4"
        },
    ],
    "errors": null
}

Responses

Number
Message
Code
200
Success

Get Collaborator

Get collaborator information for the specified collaborator.

Request

curl --location --request GET 'https://my.pressable.com/v1/collaborators/757' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw'

Parameters

ID of the collaborator to get
id (required)
integer
{
  "message": "string",
  "data": {
    "id": 757,
    "created": "2022-01-31T20:05:39.000Z",
    "updated": "2022-01-31T20:05:39.000Z",
    "accountId": 5,
    "email": "clairedoe@pressable.dev",
    "siteId": 14,
    "state": "active",
    "wpUsername": "johndoe",
    "name": "Claire Doe",
    "siteName": "jittery-crib-4894d78ee4"
  },
  "errors": [
    "string"
  ]
}

Responses

Number
Message
Code
200
Success

Bulk Create

Adds a collaborator with the given a email address to a list of sites.

Email (required)

  • This email will be used to create a new account under Pressable, and set it up as a collaborator for the sites identified by Site Ids.
  • This email will receive a notification after the process is finished. The notification may reach the junk/spam folder.

Site IDs (required)

  • Site Ids must be an array of integer numbers.
  • If the array includes the -1 value, this operation will be executed across all sites owned by the user.

Roles

  • Roles can be an array of strings.
  • Accepted values are the following:
    • clone_site
    • convert_site
    • create_collaborator
    • delete_collaborator
    • delete_site
    • disable_site
    • download_backups
    • enable_site
    • manage_dns
    • manage_git
    • manage_notes
    • manage_performance
    • reset_collaborator_password
    • restore_site
    • sftp_access
    • update_site_custom_name
    • update_site_php_version
    • update_site_wordpress_version
    • wp_access

Request

curl --location --request POST 'https://my.pressable.com/v1/collaborators/batch_create' \
--header 'Authorization: Bearer cjh02WI6u4j4QpKZeKFCAGF9uLINWTXlj9y8DnJskv4' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "johndoe@pressable.dev",
  "siteIds": [
    2, 100, 500
  ],
  "roles": [
   "clone_site", "update_site_custom_name"
  ]
}'

Parameters

Data used to create the collaborators
data (required)
(body)

Responses

Response

{
    "message": "Collaborator creation scheduled for 2 sites",
    "data": null,
    "errors": null
}
Number
Message
Code
200
Accepted

Bulk Delete

Removes a collaborator with the provided email address from a list of sites.

Email (required)

  • This email will be used to identify the collaborator you want to remove from the sites identified by Site Ids.

Site IDs (required)

  • Site Ids must be an array of integer numbers.
  • If the array includes the -1 value, this operation will be executed across all sites owned by the user.

Request

curl --location --request POST 'https://my.pressable.com/v1/collaborators/batch_destroy' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "clairedoe@pressable.dev",
  "siteIds": [
    10, 20, 50
  ]
}'

Parameters

Data used to destroy the collaborators
data (required)
(body)

Response

{
    "message": "Collaborator removal scheduled for 3 sites",
    "data": null,
    "errors": null
}

Responses

Number
Message
Code
200
Accepted

Get Site

Get a specific site that belongs to the specified collaborator.

Request

curl --location --request GET 'https://my.pressable.com/v1/collaborators/1/site' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw'

Parameters

ID of the collaborator
collaborator_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "id": 1,
        "created": "2022-01-31T20:05:30.000Z",
        "accountId": 2,
        "clonedFromId": null,
        "collaboratorsCount": 3,
        "displayName": "pressable.com",
        "domainsCount": 1,
        "ecommerce": false,
        "favorite": false,
        "ipAddress": "199.16.172.38",
        "ipAddressOne": "199.16.172.38",
        "ipAddressTwo": "199.16.173.236",
        "name": "my-presssable-net",
        "state": "live",
        "url": "pressable.com",
        "staging": false,
        "sftpDomain": "sftp.pressable.com",
        "phpVersion": null,
        "tags": []
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Add Site Tag

Create tags for a collaborator on their site.

Tag Names (array)(required)

  • Tags allow you to add context to your sites and you can use them to define what your sites are related to.

Request

curl --location --request POST 'https://my.pressable.com/v1/collaborators/1/site/tags' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw' \
--header 'Content-Type: application/json' \
--data-raw '{
  "tag_names": [
    "paper", "plastic"
  ]
}'

Parameters

ID of the collaborator
collaborator_id (required)
integer

Response

{
    "message": "Success",
    "data": {
        "id": 1,
        "created": "2022-01-31T20:05:30.000Z",
        "accountId": 2,
        "clonedFromId": null,
        "collaboratorsCount": 3,
        "displayName": "pressable.com",
        "domainsCount": 1,
        "ecommerce": false,
        "favorite": false,
        "ipAddress": "199.16.172.38",
        "ipAddressOne": "199.16.172.38",
        "ipAddressTwo": "199.16.173.236",
        "name": "my-presssable-net",
        "state": "live",
        "url": "pressable.com",
        "staging": false,
        "sftpDomain": "sftp.pressable.com",
        "phpVersion": null,
        "tags": [
            {
                "id": 2601,
                "name": "paper"
            },
            {
                "id": 2602,
                "name": "plastic"
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Delete Site Tag

Delete site tags with the specified site tag ids on a site for a collaborator.

Request

curl --location --request DELETE 'https://my.pressable.com/v1/collaborators/1/site/tags' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw' \
--header 'Content-Type: application/json' \
--data-raw '{
  "tag_ids": [
    2601, 2602
  ]
}'

Parameters

ID of the collaborator
collaborator_id (required)
integer

Response

{
    "message": "Success",
    "data": {
        "id": 1,
        "created": "2022-01-31T20:05:30.000Z",
        "accountId": 2,
        "clonedFromId": null,
        "collaboratorsCount": 3,
        "displayName": "pressable.com",
        "domainsCount": 1,
        "ecommerce": false,
        "favorite": false,
        "ipAddress": "199.16.172.38",
        "ipAddressOne": "199.16.172.38",
        "ipAddressTwo": "199.16.173.236",
        "name": "my-presssable-net",
        "state": "live",
        "url": "pressable.com",
        "staging": false,
        "sftpDomain": "sftp.pressable.com",
        "phpVersion": null,
        "tags": []
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Site List using Email Address

Get a list of all sites that are attached to a Collaborator using the collaborator's email address. All sites information returned are from the collaborator's perspective. If the site is favorited by the collaborator favorite will be set to true, if the collaborator has added tags to sites then their site tags will be in the response.

URL encode the email address in the URL

  • user.name+tag+sorting@example.com => user.name%2Btag%2Bsorting%40example.com
  • user@example.com => user%40example.com
  • user/name@example.com => user%2Fname%40example.com

v1/collaborators/user%2Fname%40example.com/sites

Request

curl --location --request GET 'https://my.pressable.com/v1/collaborators/clairedoe%40pressable.dev/sites' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw'

Parameters

Email address used to get all sites for collaborator
email_address (required)
string
(path)
Tag name for filtering site list
tag_name
(query)
Number of sites per page. Max number of sites per page is 50
per_page
(query)
The page for the request
page
(query)

Response

{
    "message": "Success",
    "data": {
        "name": "Claire Doe",
        "email": "clairedoe@pressable.dev",
        "sites": [
            {
                "id": 1,
                "created": "2022-01-31T20:05:30.000Z",
                "accountId": 2,
                "clonedFromId": null,
                "collaboratorsCount": 3,
                "displayName": "pressable.com",
                "domainsCount": 1,
                "ecommerce": false,
                "favorite": false,
                "ipAddresses": [
                    "199.16.172.38",
                    "199.16.173.236"
                ],
                "name": "my-presssable-net",
                "state": "live",
                "url": "pressable.com",
                "staging": false,
                "sftpDomain": "sftp.pressable.com",
                "phpVersion": null,
                "tags": []
            },
            {
                "id": 4,
                "created": "2022-01-31T20:05:30.000Z",
                "accountId": 2,
                "clonedFromId": null,
                "collaboratorsCount": 1,
                "displayName": "four",
                "domainsCount": 0,
                "ecommerce": false,
                "favorite": false,
                "ipAddresses": [
                    "199.16.172.123",
                    "199.16.173.175"
                ],
                "name": "four",
                "state": "live",
                "url": "four.mystagingwebsite.com",
                "staging": true,
                "sftpDomain": "sftp.pressable.com",
                "phpVersion": null,
                "tags": []
            },
        ]
    },
    "page": {
        "currentPage": 1,
        "nextPage": 2,
        "lastPage": 65,
        "perPage": 20,
        "totalItems": 1297
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Get Site using Email Address

Get a site attached to a collaborator.

Request

curl --location --request GET 'https://my.pressable.com/v1/collaborators/clairedoe%40pressable.dev/sites/1' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw'

Parameters

Email address used for collaborator
email_address (required)
string
(path)
Site Id for site being requested
site_id (required)
integer
(path)

Response

{
    "message": "Success",
    "data": {
        "name": "Claire Doe",
        "email": "clairedoe@pressable.dev",
        "sites": [
            {
                "id": 1,
                "created": "2022-01-31T20:05:30.000Z",
                "accountId": 2,
                "clonedFromId": null,
                "collaboratorsCount": 3,
                "displayName": "pressable.com",
                "domainsCount": 1,
                "ecommerce": false,
                "favorite": false,
                "ipAddresses": [
                    "199.16.172.38",
                    "199.16.173.236"
                ],
                "name": "my-presssable-net",
                "state": "live",
                "url": "pressable.com",
                "staging": false,
                "sftpDomain": "sftp.pressable.com",
                "phpVersion": null,
                "tags": []
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Add Site as Favorite

Add a site to collaborator site favorites. Favorite sites show up first in collaborator site listings.

Request

curl --location --request POST 'https://my.pressable.com/v1/collaborators/clairedoe%40pressable.dev/sites/1/favorite' \
--header 'Authorization: Bearer 9m11x6zrCUe7SKMME2dKjF4DrUGHTS8CC6rk-z1_P_M'

Parameters

Email address used for collaborator
email_address (required)
string
(path)
Site Id for site to be favorited
site_id (required)
integer
(path)

Response

{
    "message": "Success",
    "data": {
        "name": "Claire Doe",
        "email": "clairedoe@pressable.dev",
        "sites": [
            {
                "id": 1,
                "created": "2022-01-31T20:05:30.000Z",
                "accountId": 2,
                "clonedFromId": null,
                "collaboratorsCount": 3,
                "displayName": "pressable.com",
                "domainsCount": 1,
                "ecommerce": false,
                "favorite": true,
                "ipAddresses": [
                    "199.16.172.38",
                    "199.16.173.236"
                ],
                "name": "my-presssable-net",
                "state": "live",
                "url": "pressable.com",
                "staging": false,
                "sftpDomain": "sftp.pressable.com",
                "phpVersion": null,
                "tags": []
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Remove Site as Favorite

Remove a site from a collaborators list of site favorites.

Request

curl --location --request DELETE 'https://my.pressable.com/v1/collaborators/clairedoe%40pressable.dev/sites/1/favorite' \
--header 'Authorization: Bearer 9m11x6zrCUe7SKMME2dKjF4DrUGHTS8CC6rk-z1_P_M'

Parameters

Email address used for collaborator
email_address (required)
string
(path)
Site Id for site to be removed as favorite
site_id (required)
integer
(path)

Response

{
    "message": "Success",
    "data": {
        "name": "Claire Doe",
        "email": "clairedoe@pressable.dev",
        "sites": [
            {
                "id": 1,
                "created": "2022-01-31T20:05:30.000Z",
                "accountId": 2,
                "clonedFromId": null,
                "collaboratorsCount": 3,
                "displayName": "pressable.com",
                "domainsCount": 1,
                "ecommerce": false,
                "favorite": false,
                "ipAddresses": [
                    "199.16.172.38",
                    "199.16.173.236"
                ],
                "name": "my-presssable-net",
                "state": "live",
                "url": "pressable.com",
                "staging": false,
                "sftpDomain": "sftp.pressable.com",
                "phpVersion": null,
                "tags": []
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Add Site Tag using Email Address

Add tags to a collaborator’s site using the collaborator's email address.

Tag Names (array)(required)

  • Tags allow you to add context to your sites for a collaborator and can be used to define what the site is related to.

Request

curl --location --request POST 'https://my.pressable.com/v1/collaborators/clairedoe%40pressable.dev/sites/1/tag' \
--header 'Authorization: Bearer 9m11x6zrCUe7SKMME2dKjF4DrUGHTS8CC6rk-z1_P_M' \
--header 'Content-Type: application/json' \
--data-raw '{
  "tag_names": [
    "paper", "plastic"
  ]
}'

Parameters

Email address used for collaborator
email_address (required)
string
(path)
Site Id for site to be favorited
site_id (required)
integer
(path)
Name of the tag to add to the site
data (required)
(body)

Response

{
    "message": "Success",
    "data": {
        "name": "Claire Doe",
        "email": "clairedoe@pressable.dev",
        "sites": [
            {
                "id": 1,
                "created": "2022-01-31T20:05:30.000Z",
                "accountId": 2,
                "clonedFromId": null,
                "collaboratorsCount": 3,
                "displayName": "pressable.com",
                "domainsCount": 1,
                "ecommerce": false,
                "favorite": false,
                "ipAddresses": [
                    "199.16.172.38",
                    "199.16.173.236"
                ],
                "name": "my-presssable-net",
                "state": "live",
                "url": "pressable.com",
                "staging": false,
                "sftpDomain": "sftp.pressable.com",
                "phpVersion": null,
                "tags": [
                    {
                        "id": 2603,
                        "name": "paper"
                    },
                    {
                        "id": 2604,
                        "name": "plastic"
                    }
                ]
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Remove Site Tag using Email Address

Remove tags from collaborator’s site using collaborator's email address.

Tag IDs (array)(required)

Request

curl --location --request DELETE 'https://my.pressable.com/v1/collaborators/clairedoe%40pressable.dev/sites/1/tag' \
--header 'Authorization: Bearer 9m11x6zrCUe7SKMME2dKjF4DrUGHTS8CC6rk-z1_P_M' \
--header 'Content-Type: application/json' \
--data-raw '{
    "tag_ids": [
        2603, 2604
    ]
}'

Parameters

Email address used for collaborator
email_address (required)
string
(path)
Site Id for site to be favorited
site_id (required)
integer
(path)
ID(s) of the tags to remove (array)
data (required)
(body)
{
    "message": "Success",
    "data": {
        "name": "Claire Doe",
        "email": "clairedoe@pressable.dev",
        "sites": [
            {
                "id": 1,
                "created": "2022-01-31T20:05:30.000Z",
                "accountId": 2,
                "clonedFromId": null,
                "collaboratorsCount": 3,
                "displayName": "pressable.com",
                "domainsCount": 1,
                "ecommerce": false,
                "favorite": false,
                "ipAddresses": [
                    "199.16.172.38",
                    "199.16.173.236"
                ],
                "name": "my-presssable-net",
                "state": "live",
                "url": "pressable.com",
                "staging": false,
                "sftpDomain": "sftp.pressable.com",
                "phpVersion": null,
                "tags": []
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

DNS

Manage DNS through the Pressable API.

Get Zones

Get the zones attached to your account.

Zones are used to attach additional DNS records to your account.

Request

curl --location --request GET 'https://my.pressable.com/v1/zones' \
--header 'Authorization: Bearer ob9TDvE07rXgUpVVZdNCNWIUYCDVghy8dZr1u2gH-o4'

Parameters

No parameters

Response

{
    "message": "Success",
    "data": [
        {
            "id": 1,
            "name": "pressable.dev",
            "created": "2022-01-31T20:05:45.000Z"
        },
        {
            "id": 5,
            "name": "apple.com",
            "created": "2022-02-02T17:10:32.000Z"
        },
        {
            "id": 6,
            "name": "newdomain.com",
            "created": "2022-02-18T16:49:40.000Z"
        }
    ],
    "errors": null
}

Responses

Number
Message
Code
200
Success

Get Zone Records

Returns all the DNS records attached to a zone.

Request

curl --location --request GET 'https://my.pressable.com/v1/zones/6/records' \
--header 'Authorization: Bearer ob9TDvE07rXgUpVVZdNCNWIUYCDVghy8dZr1u2gH-o4'

Parameters

ID of the zone
zone_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "id": 6,
        "created": "2022-02-18T16:49:40.000Z",
        "updated": "2022-02-18T16:49:40.000Z",
        "name": "newdomain.com",
        "records": [
            {
                "id": 37,
                "zoneId": 6,
                "primary": false,
                "type": "A",
                "name": "www",
                "value": "199.16.172.38",
                "priority": null,
                "weight": null,
                "port": null,
                "ttl": 3600,
                "siteId": 1,
                "created": "2022-02-18T16:49:40.000Z"
            },
            {
                "id": 38,
                "zoneId": 6,
                "primary": false,
                "type": "A",
                "name": "www",
                "value": "199.16.173.236",
                "priority": null,
                "weight": null,
                "port": null,
                "ttl": 3600,
                "siteId": 1,
                "created": "2022-02-18T16:49:40.000Z"
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Create Zone Record

When creating a new DNS Record supply all the required fields so the DNS record is built correctly.

The following fields are used, depending on the type of record being create:

{
  type: string
  name: string
  value: string
  priority: integer
  weight: integer
  port: integer
  ttl: integer [Default: 3600]
  site_id: integer [A Records only]
}

Please see the record requirements below:

Request

curl --location --request POST 'https://my.pressable.com/v1/zones/6/records' \
--header 'Authorization: Bearer ob9TDvE07rXgUpVVZdNCNWIUYCDVghy8dZr1u2gH-o4' \
--header 'Content-Type: application/json' \
--data-raw '{
  "type": "CNAME",
  "name": "newsite2",
  "value": "newsite2",
  "ttl": 0
}'

Parameters

ID of the zone for which the DNS record should be created
zone_id (required)
integer($int64)
(path)
Data used to create a new DNS record
data (required)
(body)

Response

{
    "message": "Success",
    "data": {
        "id": 6,
        "created": "2022-02-18T16:49:40.000Z",
        "updated": "2022-02-18T16:49:40.000Z",
        "name": "newdomain.com",
        "records": [
            {
                "id": 37,
                "zoneId": 6,
                "primary": false,
                "type": "A",
                "name": "www",
                "value": "199.16.172.38",
                "priority": null,
                "weight": null,
                "port": null,
                "ttl": 3600,
                "siteId": 1,
                "created": "2022-02-18T16:49:40.000Z"
            },
            {
                "id": 38,
                "zoneId": 6,
                "primary": false,
                "type": "A",
                "name": "www",
                "value": "199.16.173.236",
                "priority": null,
                "weight": null,
                "port": null,
                "ttl": 3600,
                "siteId": 1,
                "created": "2022-02-18T16:49:40.000Z"
            },
            {
                "id": 39,
                "zoneId": 6,
                "primary": false,
                "type": "CNAME",
                "name": "newsite2",
                "value": "newsite2.",
                "priority": null,
                "weight": null,
                "port": null,
                "ttl": 0,
                "siteId": null,
                "created": "2022-02-21T17:21:57.000Z"
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Created

Delete Record

Delete a DNS record from a zone.

Request

curl --location --request DELETE 'https://my.pressable.com/v1/zones/6/records/38' \
--header 'Authorization: Bearer ob9TDvE07rXgUpVVZdNCNWIUYCDVghy8dZr1u2gH-o4'

Parameters

ID of the Zone for which the record will be deleted
zone_id (required)
integer($int64)
(path)
ID of the DNS record that should be deleted
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "id": 6,
        "created": "2022-02-18T16:49:40.000Z",
        "updated": "2022-02-18T16:49:40.000Z",
        "name": "newdomain.com",
        "records": [
            {
                "id": 37,
                "zoneId": 6,
                "primary": false,
                "type": "A",
                "name": "www",
                "value": "199.16.172.38",
                "priority": null,
                "weight": null,
                "port": null,
                "ttl": 3600,
                "siteId": 1,
                "created": "2022-02-18T16:49:40.000Z"
            },
            {
                "id": 39,
                "zoneId": 6,
                "primary": false,
                "type": "CNAME",
                "name": "newsite2",
                "value": "newsite2.",
                "priority": null,
                "weight": null,
                "port": null,
                "ttl": 0,
                "siteId": null,
                "created": "2022-02-21T17:21:57.000Z"
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Deleted

Generate Email Provider Records

Generate all the email records for popular providers. The records will be attached to the requested zone.

Current providers and the name used to add them are:

  • gsuite- Google Workspace records
  • office365- Microsoft Office365 records
  • zoho- Zoho Corporation records
  • namecheap- Namecheap records
  • namecom- Name.com records
  • proton- Proton Technologies AG records

Request

curl --location --request POST 'https://my.pressable.com/v1/zones/3/providers' \
--header 'Authorization: Bearer ki1ssXMLyJ-NPv7nInwXA4-Z6vYK4_kPTw8jHqU0eZA' \
--header 'Content-Type: application/json' \
--data-raw '{
  "provider": "zoho"
}'

Parameters

ID of the zone
zone_id (required)
integer($int64)
(path)
Data used to create email provider records
data (required)
(body)

Response

{
    "message": "Success",
    "data": null,
    "errors": null
}

Responses

Number
Message
Code
200
Created

Sites

Site List

Get a list of sites belonging to your account. Sites can be filtered by tag name. Site listing is a full list of sites attached to your account, unless pagination is requested.

Request a paginated response by sending "paginate" set to true in the query parameters. Additional accepted parameters include "per_page" and "page".

  • per_page: the amount of sites returned in a response
  • page: the page of the response

When paginating, additional information will be placed in the response regarding paging information:

Request

curl --location --request GET 'https://my.pressable.com/v1/sites' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh' \
--header 'Content-Type: application/json' \
--data-raw '{
    "paginate": true
}'

Parameters

Site tag name
tag_name
(query)
Request a paginated response
paginate
(query)
Number of sites per page. Max number of sites per page is 50
per_page
(query)
The page for the request
page
(query)

Response

{
    "message": "Success",
    "data": [
        {
            "id": 1,
            "created": "2022-01-31T20:05:30.000Z",
            "accountId": 2,
            "clonedFromId": null,
            "collaboratorsCount": 3,
            "datacenterCode": "DFW",
            "datacenterName": "Dallas, TX, USA",
            "displayName": "pressable.com",
            "domainsCount": 1,
            "ecommerce": false,
            "favorite": false,
            "ipAddress": "199.16.172.38",
            "ipAddressOne": "199.16.172.38",
            "ipAddressTwo": "199.16.173.236",
            "name": "my-presssable-net",
            "state": "live",
            "url": "pressable.com",
            "staging": false,
            "sftpDomain": "sftp.pressable.com",
            "phpVersion": null,
            "tags": [
                {
                    "id": 1357,
                    "name": "Halo 3: ODST"
                }
            ]
        },
        {
            "id": 3,
            "created": "2022-01-31T20:05:30.000Z",
            "accountId": 2,
            "clonedFromId": null,
            "collaboratorsCount": 0,
            "datacenterCode": "DCA",
            "datacenterName": "Washington, DC, USA",
            "displayName": "zippykidnetworks-net",
            "domainsCount": 0,
            "ecommerce": false,
            "favorite": false,
            "ipAddress": "199.16.172.107",
            "ipAddressOne": "199.16.172.107",
            "ipAddressTwo": "199.16.173.153",
            "name": "zippykidnetworks-net",
            "state": "deploying",
            "url": "zippykidnetworks-net.mystagingwebsite.com",
            "staging": false,
            "sftpDomain": "sftp.pressable.com",
            "phpVersion": null,
            "tags": []
        },
        {
            "id": 4,
            "created": "2022-01-31T20:05:30.000Z",
            "accountId": 2,
            "clonedFromId": null,
            "collaboratorsCount": 1,
            "datacenterCode": "N/A",
            "datacenterName": "N/A",
            "displayName": "four",
            "domainsCount": 0,
            "ecommerce": false,
            "favorite": false,
            "ipAddress": "199.16.172.123",
            "ipAddressOne": "199.16.172.123",
            "ipAddressTwo": "199.16.173.175",
            "name": "four",
            "state": "live",
            "url": "four.mystagingwebsite.com",
            "staging": true,
            "sftpDomain": "sftp.pressable.com",
            "phpVersion": null,
            "tags": [
                {
                    "id": 744,
                    "name": "Super Mario Bros. 3"
                }
            ]
        },
    ],
    "page": {
        "currentPage": 1,
        "nextPage": 2,
        "lastPage": 66,
        "perPage": 20,
        "totalItems": 1309
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Create Site

Create a new site in your account.

Name (required)

  • Site name must be at least 4 characters
  • Periods, spaces, and other special characters are not permitted
  • Dashes are accepted, but name cannot start or end with a dash

PHP Version (optional)

  • Set your PHP Version to a valid value. If no version is set in the parameter a dafault PHP version will be used Valid PHP Versions: 8.0 and 8.1

Datacenter (optional)

  • Provide a datacenter code to create your site at a specific location.
  • Use the Datacenter endpoint to determine which datacenters you have access to
  • When not specifying a datacenter to use when creating a site a default datacenter will be used

Staging (optional)

  • A staging site can be used to test updates and changes before deploying those changes to your live site
  • Domains can not be added to a staging site
  • Valid values are either true or false
  • Default: false

Install (optional)

  • Use the install feature to install plugins that you have access to
  • Use the #site-install-options to determine what install options you have access to
  • When not sending an install option when creating a site a default installation of WordPress in used

Remember to check your email inbox (and spam folder) for your login details and additional site instructions.

Request

curl --location --request POST 'https://my.pressable.com/v1/sites' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh34' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "your-site-name",
  "php_version": "8.0",
  "staging": true,
  "install": "woocommerce",
  "datacenter_code": "DCA"
}'

Parameters

Data used to create a new site
data (required)
(body)

Response

{
    "message": "Success",
    "data": {
        "id": 1314,
        "created": "2022-02-17T20:50:05.000Z",
        "accountId": 2,
        "clonedFromId": null,
        "collaboratorsCount": 0,
        "datacenterCode": "DCA",
        "datacenterName": "Washington, DC, USA",
        "displayName": "your-site-name",
        "domainsCount": 0,
        "ecommerce": false,
        "favorite": false,
        "ipAddress": "199.16.172.70",
        "ipAddressOne": "199.16.172.70",
        "ipAddressTwo": "199.16.173.246",
        "name": "your-site-name",
        "state": "deploying",
        "url": "your-site-name.mystagingwebsite.com",
        "staging": true,
        "sftpDomain": "sftp.pressable.com",
        "phpVersion": 8.0,
        "tags": []
    },
    "errors": null
}

Responses

Number
Message
Code
201
Created

Get Site

Get site information and settings.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh'

Parameters

ID of the site to get
id (required)
integer($int64)
(path)

Request

{
    "message": "Success",
    "data": {
        "id": 1,
        "created": "2022-01-31T20:05:30.000Z",
        "accountId": 2,
        "clonedFromId": null,
        "datacenterCode": "DFW",
        "datacenterName": "Dallas, TX, USA",
        "displayName": "pressable.com",
        "ecommerce": false,
        "favorite": false,
        "ipAddress": "199.16.172.38",
        "ipAddressOne": "199.16.172.38",
        "ipAddressTwo": "199.16.173.236",
        "name": "my-presssable-net",
        "pageViews": {
            "allTime": {
                "people": 0,
                "views": 0
            },
            "currentMonth": {
                "people": 0,
                "views": 0
            },
            "lastMonth": {
                "views": 0,
                "people": 0
            },
            "today": {
                "people": 0,
                "views": 0
            },
            "twoMonthsAgo": {
                "views": 0,
                "people": 0
            },
            "yesterday": {
                "people": 0,
                "views": 0
            }
        },
        "phpVersion": null,
        "sftpDomain": "sftp.pressable.com",
        "state": "live",
        "url": "pressable.com",
        "wordpressLoginUrl": "pressable.com/wp-admin",
        "staging": false,
        "tags": [
            {
                "id": 1357,
                "name": "Halo 3: ODST"
            }
        ],
        "collaborators": [
            {
                "id": 1,
                "created": "2022-01-31T20:05:39.000Z",
                "email": "janedoe@pressable.dev",
                "gravatar": "https://www.gravatar.com/avatar/eabc66b353b56eba0b94ff5695fbcfbf?d=mp",
                "name": "Jane Doe",
                "wpUsername": "jane",
                "username": "46e652f73b2afc"
            },
            {
                "id": 2,
                "created": "2022-01-31T20:05:39.000Z",
                "email": "tomdoe@pressable.dev",
                "gravatar": "https://www.gravatar.com/avatar/127a526b67c878d70961db95ae87fa56?d=mp",
                "name": "Tom Doe",
                "wpUsername": "tom",
                "username": "6f4c70e32926e2"
            },
            {
                "id": 1203,
                "created": "2022-01-31T20:05:39.000Z",
                "email": "clairedoe@pressable.dev",
                "gravatar": "https://www.gravatar.com/avatar/595f525cba4a637978bc1ab2899f1d52?d=mp",
                "name": "Claire Doe",
                "wpUsername": "johndoe",
                "username": null
            }
        ],
        "jetpack": {
            "message": "Success",
            "state": "active"
        }
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Update Site

Update the Display Name or PHP Version for a site.

Display Name

  • Do you have a confusing display name for your site? You can update your site's display name to make things easier for you to keep track of.

PHP Version

  • Update your site's PHP Version. Valid PHP Versions: 8.0 and 8.1

Request

curl --location --request PUT 'https://my.pressable.com/v1/sites/500' \
--header 'Authorization: Bearer cjh02WI6u4j4QpKZeKFCAGF9uLINWTXlj9y8Dn' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "Five Hundred Site",
  "php_version": "8.0"
}'

Parameters

Update Site Details
data (required)
(body)

Response

{
    "message": "Success",
    "data": {
        "id": 500,
        "created": "2022-01-31T20:05:33.000Z",
        "accountId": 2,
        "clonedFromId": null,
        "collaboratorsCount": 1,
        "displayName": "five hundred site",
        "domainsCount": 0,
        "ecommerce": false,
        "favorite": false,
        "ipAddress": "79.127.25.163",
        "ipAddressOne": "79.127.25.163",
        "ipAddressTwo": "235.255.236.118",
        "name": "busy-nose-1d7f431a88",
        "state": "live",
        "url": "busy-nose-1d7f431a88.mystagingwebsite.com",
        "staging": false,
        "sftpDomain": "sftp.pressable.com",
        "phpVersion": "8.0",
        "tags": [
            {
                "id": 354,
                "name": "Clannad"
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Updated Site Details

Delete Site

Delete a site with the specified id.

Request

curl --location --request DELETE 'https://my.pressable.com/v1/sites/555' \
--header 'Authorization: Bearer cjh02WI6u4j4QpKZeKFCAGF9uLINWTXlj9y8Dn'

Parameters

ID of the site to delete
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": null,
    "errors": null
}

Responses

Number
Message
Code
200
Success

Site Install Options

When creating a new site you can select for certain options available to be installed, such as woocommerce. This endpoint will return an array of install options available to you. When not sending an install option when creating a site a default installation of WordPress in used.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/install-options' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'

Parameters

No parameters

Response

{
    "message": "Success",
    "data": [
        "wordpress",
        "woocommerce"
    ],
    "errors": null
}

Responses

Number
Message
Code
200
Available install options

Available Site Datacenters

When creating a new site you can select for a certain datacenter that is available to be used. Use the datacenter code when creating a site. This endpoint will return a collection of datacenter options available to you. When not specifying a datacenter to use when creating a site a default datacenter will be used.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/datacenters' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3434'

Parameters

No parameters

Response

{
    "message": "Success",
    "data": [
        {
            "code": "BUR",
            "name": "Los Angeles, CA, USA"
        },
        {
            "code": "DCA",
            "name": "Washington, DC, USA"
        },
        {
            "code": "DFW",
            "name": "Dallas, TX, USA"
        }
    ],
    "errors": null
}

Responses

Number
Message
Code
200
Available datacenter options

Valid PHP Versions

Get valid PHP versions that are currently available for sites hosted within our platform.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/php-versions' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh34'

Parameters

No parameters

Response

{
    "message": "Success",
    "data": [
        "8.0",
        "8.1"
    ],
    "errors": null
}

Responses

Number
Message
Code
200
Success

Disable Site

When disabling a site the site will be put in a suspended state and all requests to the site will receive a 410 Gone response. The disabled site will still count towards your site billing count.

This endpoint only works for API Applications with account owner permission.

More information:https://pressable.com/knowledgebase/disabling-a-site

Request

curl --location --request PUT 'https://my.pressable.com/v1/sites/500/disable' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3434'

Parameters

ID of the site to be disabled
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "id": 500,
        "created": "2022-01-31T20:05:33.000Z",
        "accountId": 2,
        "clonedFromId": null,
        "collaboratorsCount": 1,
        "datacenterCode": "N/A",
        "datacenterName": "N/A",
        "displayName": "five hundred site",
        "domainsCount": 0,
        "ecommerce": false,
        "favorite": false,
        "ipAddress": "79.127.25.163",
        "ipAddressOne": "79.127.25.163",
        "ipAddressTwo": "235.255.236.118",
        "name": "busy-nose-1d7f431a88",
        "state": "disabled",
        "url": "busy-nose-1d7f431a88.mystagingwebsite.com",
        "staging": false,
        "sftpDomain": "sftp.pressable.com",
        "phpVersion": "8.0",
        "tags": [
            {
                "id": 354,
                "name": "Clannad"
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Enable Site

This only works for sites that are currently disabled. Enabling a site returns the site to a live state allowing for normal html responses, removing the 410 Gone response for users.

This endpoint only works for API Applications with account owner permission.

More information:https://pressable.com/knowledgebase/disabling-a-site

Request

curl --location --request PUT 'https://my.pressable.com/v1/sites/500/enable' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh34'

Parameters

ID of the site to be enabled
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "id": 500,
        "created": "2022-01-31T20:05:33.000Z",
        "accountId": 2,
        "clonedFromId": null,
        "collaboratorsCount": 1,
        "datacenterCode": "N/A",
        "datacenterName": "N/A",
        "displayName": "five hundred site",
        "domainsCount": 0,
        "ecommerce": false,
        "favorite": false,
        "ipAddress": "79.127.25.163",
        "ipAddressOne": "79.127.25.163",
        "ipAddressTwo": "235.255.236.118",
        "name": "busy-nose-1d7f431a88",
        "state": "live",
        "url": "busy-nose-1d7f431a88.mystagingwebsite.com",
        "staging": false,
        "sftpDomain": "sftp.pressable.com",
        "phpVersion": "8.0",
        "tags": [
            {
                "id": 354,
                "name": "Clannad"
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Convert Site (Staging/Live)

Staging to Live

Converting a staging site to a live site will add the site to your billable sites, also giving you the ability to add domains to the site.

Live to Staging

Before converting a live site to a staging site verify you have removed all attached DNS records. Converting to a staging site will remove your ability to add DNS records to the site, as well as, remove the site from your billable sites.

This endpoint only works for API Applications with account owner permission.

More information:https://pressable.com/knowledgebase/how-sites-staging-websites-and-website-clones-work-at-pressable/#converting-sites

Request

curl --location --request PUT 'https://my.pressable.com/v1/sites/500/convert' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh34'

Parameters

ID of the site to be converted
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "id": 500,
        "created": "2022-01-31T20:05:33.000Z",
        "accountId": 2,
        "clonedFromId": null,
        "datacenterCode": "N/A",
        "datacenterName": "N/A",
        "displayName": "five hundred site",
        "ecommerce": false,
        "favorite": false,
        "ipAddress": "79.127.25.163",
        "ipAddressOne": "79.127.25.163",
        "ipAddressTwo": "235.255.236.118",
        "name": "busy-nose-1d7f431a88",
        "pageViews": {
            "allTime": {
                "people": 0,
                "views": 0
            },
            "currentMonth": {
                "people": 0,
                "views": 0
            },
            "lastMonth": {
                "views": 0,
                "people": 0
            },
            "today": {
                "people": 0,
                "views": 0
            },
            "twoMonthsAgo": {
                "views": 0,
                "people": 0
            },
            "yesterday": {
                "people": 0,
                "views": 0
            }
        },
        "phpVersion": "7.4",
        "sftpDomain": "sftp.pressable.com",
        "state": "live",
        "url": "busy-nose-1d7f431a88.mystagingwebsite.com",
        "wordpressLoginUrl": "busy-nose-1d7f431a88.mystagingwebsite.com/wp-admin",
        "staging": true,
        "tags": [
            {
                "id": 354,
                "name": "Clannad"
            }
        ],
        "collaborators": [
            {
                "id": 484,
                "created": "2022-01-31T20:05:39.000Z",
                "email": "clairedoe@pressable.dev",
                "gravatar": "https://www.gravatar.com/avatar/595f525cba4a637978bc1ab2899f1d52?d=mp",
                "name": "Claire Doe",
                "wpUsername": "johndoe",
                "username": null
            }
        ],
        "jetpack": null
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Clear CDN Cache

Clear the CDN cache for a site with the specified id.

Request

curl --location --request DELETE 'https://my.pressable.com/v1/sites/1/cache' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh34347g'

Parameters

ID of the site for which to clear the CDN cache
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": null,
    "errors": null
}

Responses

Number
Message
Code
200
Success

Get CDN Status

Get the CDN status for a site with the specified id. The status can be either enabled or disabled.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/cdn' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'

Parameters

ID of the site for which to clear the CDN cache
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "cdnEnabled": true
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Enable CDN

Enable the CDN for a site with the specified id.

Request

curl --location --request POST 'https://my.pressable.com/v1/sites/500/cdn' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'

Parameters

ID of the site for which to enable the CDN
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "cdnEnabled": true
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Disable CDN

Disable the CDN for a site with the specified id.

Request

curl --location --request DELETE 'https://my.pressable.com/v1/sites/500/cdn' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'

Parameters

ID of the site for which to disable the CDN
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "cdnEnabled": false
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Toggle CDN

Enable or Disable the CDN for a site with the specified id.

Request

curl --location --request PUT 'https://my.pressable.com/v1/sites/500/cdn' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'

Parameters

ID of the site for which to enable or disable the CDN
site_id (required)
integer($int64)
(path)

Response

{
  "message": "Success",
  "data": {
      "cdnEnabled": true
  },
  "errors": null
}

Responses

Number
Message
Code
200
Success

Flush Object Cache

Flush the object cache for a site with the specified id.

Request

curl --location --request DELETE 'https://my.pressable.com/v1/sites/500/object-cache' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'

Parameters

ID of the site for which to flush the object cache
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": null,
    "errors": null
}

Responses

Number
Message
Code
200
Success

Favorite Site

Add a site to your site favorites, favorite sites show up first in site listings.

Request

curl --location --request POST 'https://my.pressable.com/v1/sites/500/favorites' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'

Parameters

ID of the site to add as favorite
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": null,
    "errors": null
}

Responses

Number
Message
Code
200
Success

Unfavorite Site

Remove a site as a favorite with the specified site id.

Request

curl --location --request DELETE 'https://my.pressable.com/v1/sites/500/favorites' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'

Parameters

ID of the site to remove as a favorite
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": null,
    "errors": null
}

Responses

Number
Message
Code
200
Success

Create Site Clone

Create a copy of the specified site.

Request

curl --location --request POST 'https://my.pressable.com/v1/sites/500/clone' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "five-hundred-clone",
  "staging": true,
  "datacenter_code": "DCA"
}'

Parameters

ID of the site to clone
site_id (required)
integer($int64)
(path)
Data used to clone the site
data
(body)

Response

{
    "message": "Success",
    "data": {
        "id": 1315,
        "created": "2022-02-17T21:48:03.000Z",
        "accountId": 2,
        "clonedFromId": 500,
        "collaboratorsCount": 0,
        "datacenterCode": "DCA",
        "datacenterName": "Washington, DC, USA",
        "displayName": "five-hundred-clone",
        "domainsCount": 0,
        "ecommerce": false,
        "favorite": false,
        "ipAddress": "199.16.172.247",
        "ipAddressOne": "199.16.172.247",
        "ipAddressTwo": "199.16.173.144",
        "name": "five-hundred-clone",
        "state": "cloning",
        "url": "five-hundred-clone.mystagingwebsite.com",
        "staging": true,
        "sftpDomain": "sftp.pressable.com",
        "phpVersion": null,
        "tags": []
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Backups List

Get a list of available site backups for the specified site.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/backups' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz'

Parameters

ID of the site to which to get the backups
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": [
        {
            "timestamp": "2022-02-18-00-00",
            "siteId": 1,
            "databaseBackupId": 1234,
            "filesystemBackupId": 5678
        },
        {
            "timestamp": "2022-02-17-12-00",
            "siteId": 1,
            "databaseBackupId": 1234,
            "filesystemBackupId": 5678
        },
        {
            "timestamp": "2022-02-16-23-59",
            "siteId": 1,
            "databaseBackupId": 1234,
            "filesystemBackupId": 5678
        },
        {
            "timestamp": "2022-02-11-00-00",
            "siteId": 1,
            "databaseBackupId": 1234,
            "filesystemBackupId": null
        }
    ],
    "errors": null
}

Responses

Number
Message
Code
200
Success

Get Site Backup

Download a specified site backup

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/backups' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz'

Parameters

ID of the site to which to get the backups
site_id (required)
integer($int64)
(path)
ID of the site backup to download
backup_id (required)
integer($int64)
(path)

Response

{
  "message": "string",
  "errors": [
    "string"
  ]
}

Responses

Number
Message
Code
200
Bzipped tar archive of filesystem backup or SQL text backup of database backup

Site Filesystem & Database Restores

Restore your site from a Filesystem and/or Database backup. During a restore, your site will be set in maintenance mode and will be inaccessible for the duration of the restore, which can take anywhere from a few minutes to a few hours, depending on the size of your site. To restore your website to a previous version, select a filesystem and/or database backup from the backup list. You will receive an email when the restore attempt is finished.

Warning: The restore process is irreversible and rolling back your database may cause loss of data.

Request

curl --location --request POST 'https://my.pressable.com/v1/sites/1/restores' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz' \
--header 'Content-Type: application/json' \
--data-raw '{
  "filesystem_id": 1234,
  "database_id": 5678
}'

Parameters

ID of the site to which to get the backups
site_id (required)
integer($int64)
(path)

Response

{
  "message": "Success",
  "data": null,
  "errors": null
}

Responses

Number
Message
Code
200
Success

Collaborator List

Get a list of collaborators for the specified site.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/collaborators' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzv'

Parameters

ID of the site to which to get the collaborators
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": [
        {
            "id": 1,
            "created": "2022-01-31T20:05:39.000Z",
            "updated": "2022-01-31T20:05:39.000Z",
            "accountId": 3,
            "email": "janedoe@pressable.dev",
            "siteId": 1,
            "state": "active",
            "wpUsername": "jane",
            "name": "Jane Doe",
            "siteName": "my-presssable-net"
        },
        {
            "id": 2,
            "created": "2022-01-31T20:05:39.000Z",
            "updated": "2022-01-31T20:05:39.000Z",
            "accountId": 4,
            "email": "tomdoe@pressable.dev",
            "siteId": 1,
            "state": "active",
            "wpUsername": "tom",
            "name": "Tom Doe",
            "siteName": "my-presssable-net"
        },
        {
            "id": 1203,
            "created": "2022-01-31T20:05:39.000Z",
            "updated": "2022-01-31T20:05:39.000Z",
            "accountId": 5,
            "email": "clairedoe@pressable.dev",
            "siteId": 1,
            "state": "active",
            "wpUsername": "johndoe",
            "name": "Claire Doe",
            "siteName": "my-presssable-net"
        }
    ],
    "errors": null
}

Responses

Number
Message
Code
200
Success

Create Site Collaborator

Create a new collaborator with the specified email on the specified site.

Request

curl --location --request POST 'https://my.pressable.com/v1/sites/1/collaborators' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz' \
--header 'Content-Type: application/json' \
--data-raw '{
  "siteId": 1,
  "email": "waynedoe@pressable.dev"
}'

Parameters

ID of the site to which to add the collaborator
site_id (required)
integer($int64)
(path)
Data used to create the collaborator
data (required)
(body)

Response

{
    "message": "Success",
    "data": {
        "id": 1303,
        "created": "2022-02-18T16:25:46.000Z",
        "updated": "2022-02-18T16:25:47.000Z",
        "accountId": 7,
        "email": "waynedoe@pressable.dev",
        "siteId": 1,
        "state": "active",
        "wpUsername": "waynedoe@pressable.dev",
        "name": "waynedoe@pressable.dev",
        "siteName": "my-presssable-net"
    },
    "errors": null
}

Responses

Number
Message
Code
200
Created

Get Site Collaborator

Get site collaborator information.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/collaborators/1303' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzv'

Parameters

ID of the site to which to get the collaborator
site_id (required)
integer($int64)
(path)
ID of the collaborator to get
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "id": 1303,
        "created": "2022-02-18T16:25:46.000Z",
        "updated": "2022-02-18T16:25:47.000Z",
        "accountId": 7,
        "email": "waynedoe@pressable.dev",
        "siteId": 1,
        "state": "active",
        "wpUsername": "waynedoe@pressable.dev",
        "name": "waynedoe@pressable.dev",
        "siteName": "my-presssable-net"
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Delete Collaborator

Delete a collaborator with the specified id.

Request

curl --location --request DELETE 'https://my.pressable.com/v1/sites/1/collaborators/1303' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'

Parameters

ID of the site to which to delete the collaborator
site_id (required)
integer($int64)
(path)
ID of the collaborator to delete
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": null,
    "errors": null
}

Responses

Number
Message
Code
200
Success

Set Collaborator WP-Admin Password

If one of your collaborators is unable to log into the site’s WordPress dashboard because of a forgotten, or unknown, password, this endpoint can be used to set their WP Admin password to a randomly generated value.

More information:https://pressable.com/knowledgebase/resetting-your-wp-admin-password

Request

curl --location --request PUT 'https://my.pressable.com/v1/sites/1/collaborators/2/wp-password-reset' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'

Parameters

ID of the site the collaborator belongs to
id (required)
integer($int64)
(path)
ID of the collaborator to reset the WP Admin password for
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": "!WGhilzTwgAItI!q_GcyhF_o",
    "errors": null
}

Responses

Number
Message
Code
200
Success

Domain List

Get a list of domains for the specified site

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/domains' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'

Parameters

ID of the site to which to get the domains
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": [
        {
            "id": 20,
            "created": "2022-02-02T17:02:51.000Z",
            "primary": true,
            "name": null,
            "healthy": false,
            "dnsConfirmed": false,
            "provisioned": false,
            "domainName": "pressable.com",
            "ipAddresses": [
                "199.16.172.38",
                "199.16.173.236"
            ]
        },
        {
            "id": 22,
            "created": "2022-02-02T17:02:51.000Z",
            "primary": false,
            "name": "www",
            "healthy": false,
            "dnsConfirmed": false,
            "provisioned": false,
            "domainName": "www.pressable.com",
            "ipAddresses": [
                "199.16.172.38",
                "199.16.173.236"
            ]
        }
    ],
    "errors": null
}

Responses

Number
Message
Code
200
Success

Add Domain

Add a new domain to a site.

Request

curl --location --request POST 'https://my.pressable.com/v1/sites/1/domains' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "newdomain.com"
}'

Parameters

ID of the site to which to add the domain
site_id (required)
integer($int64)
(path)
Data used to add domain to site
data (required)
(body)

Response

{
    "message": "Success",
    "data": [
        {
            "id": 20,
            "created": "2022-02-02T17:02:51.000Z",
            "primary": true,
            "name": null,
            "healthy": false,
            "dnsConfirmed": false,
            "provisioned": false,
            "domainName": "pressable.com",
            "ipAddresses": [
                "199.16.172.38",
                "199.16.173.236"
            ]
        },
        {
            "id": 22,
            "created": "2022-02-02T17:02:51.000Z",
            "primary": false,
            "name": "www",
            "healthy": false,
            "dnsConfirmed": false,
            "provisioned": false,
            "domainName": "www.pressable.com",
            "ipAddresses": [
                "199.16.172.38",
                "199.16.173.236"
            ]
        },
        {
            "id": 35,
            "created": "2022-02-18T16:49:40.000Z",
            "primary": false,
            "name": null,
            "healthy": false,
            "dnsConfirmed": false,
            "provisioned": false,
            "domainName": "newdomain.com",
            "ipAddresses": [
                "199.16.172.38",
                "199.16.173.236"
            ]
        },
        {
            "id": 37,
            "created": "2022-02-18T16:49:40.000Z",
            "primary": false,
            "name": "www",
            "healthy": false,
            "dnsConfirmed": false,
            "provisioned": false,
            "domainName": "www.newdomain.com",
            "ipAddresses": [
                "199.16.172.38",
                "199.16.173.236"
            ]
        }
    ],
    "errors": null
}

Responses

Number
Message
Code
200
Created

Get Domain

Get domain information.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/domains/35' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'

Parameters

ID of the site to which to get the domains
site_id (required)
integer($int64)
(path)
ID of the domain to get
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "id": 35,
        "created": "2022-02-18T16:49:40.000Z",
        "primary": false,
        "name": null,
        "healthy": false,
        "dnsConfirmed": false,
        "provisioned": false,
        "domainName": "newdomain.com",
        "ipAddresses": [
            "199.16.172.38",
            "199.16.173.236"
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Delete Domain

Delete a domain from a site.

Request

curl --location --request DELETE 'https://my.pressable.com/v1/sites/1/domains/35' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'

Parameters

ID of the site to which to delete the domain
site_id (required)
integer($int64)
(path)
ID of the domain to delete
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": null,
    "errors": null
}

Responses

Number
Message
Code
200
Success

Set Primary Domain

Set a domain as the primary domain. All other ARecord domains attached to your site will redirect to the primary domain.

Note:To reset your primary domain to the staging domain send a domain id of -1

Request

curl --location --request DELETE 'https://my.pressable.com/v1/sites/1/domains/35' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'

Parameters

ID of the site to which to set the primary domain
site_id (required)
integer($int64)
(path)
ID of the domain to set as the primary domain
id (required)
integer($int64)
(path)

Response

{
  "message": "string",
  "data": [
    {
      "id": 0,
      "created": "string",
      "primary": true,
      "name": "string",
      "healthy": true,
      "dnsConfirmed": true,
      "provisioned": true,
      "domainName": "string",
      "ipAddresses": [
        "string"
      ]
    }
  ],
  "errors": [
    "string"
  ]
}

Responses

Number
Message
Code
200
Success

Get SFTP User List

Get a list of FTP users for the specified site.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/ftp' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'

Parameters

ID of the site to which to get the FTP users
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": [
        {
            "id": 1,
            "created": "2022-01-31T20:05:39.000Z",
            "accessed": "2022-01-31T20:05:39.000Z",
            "modified": "2022-01-31T20:05:39.000Z",
            "accountId": 2,
            "sftpDomain": "sftp.pressable.com",
            "siteId": 1,
            "siteName": "my-presssable-net",
            "username": "46e652f73b2afc",
            "owner": false,
            "email": "janedoe@pressable.dev"
        },
        {
            "id": 2,
            "created": "2022-01-31T20:05:39.000Z",
            "accessed": "2022-01-31T20:05:39.000Z",
            "modified": "2022-01-31T20:05:39.000Z",
            "accountId": 2,
            "sftpDomain": "sftp.pressable.com",
            "siteId": 1,
            "siteName": "my-presssable-net",
            "username": "6f4c70e32926e2",
            "owner": false,
            "email": "tomdoe@pressable.dev"
        },
        {
            "id": 49,
            "created": "2022-01-31T20:05:39.000Z",
            "accessed": "2022-01-31T20:05:39.000Z",
            "modified": "2022-01-31T20:05:39.000Z",
            "accountId": 2,
            "sftpDomain": "sftp.pressable.com",
            "siteId": 1,
            "siteName": "my-presssable-net",
            "username": "6dccad86",
            "owner": false,
            "email": "clairedoe@pressable.dev"
        },
        {
            "id": 1303,
            "created": "2022-01-31T20:05:40.000Z",
            "accessed": "2022-01-31T20:05:40.000Z",
            "modified": "2022-01-31T20:05:40.000Z",
            "accountId": 2,
            "sftpDomain": "sftp.pressable.com",
            "siteId": 1,
            "siteName": "my-presssable-net",
            "username": "my-presssable-net",
            "owner": true,
            "email": "johndoe@pressable.dev"
        }
    ],
    "errors": null
}

Responses

Number
Message
Code
200
Success

Get SFTP User

Get SFTP user by Id for the specified site.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/ftp/my-presssable-net' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'

Parameters

ID of the site to which to get the FTP users
site_id (required)
integer($int64)
(path)
Username of the site FTP user for which to get
username (required)
string
(path)

Response

{
    "message": "Success",
    "data": {
        "id": 1303,
        "created": "2022-01-31T20:05:40.000Z",
        "accessed": "2022-01-31T20:05:40.000Z",
        "modified": "2022-01-31T20:05:40.000Z",
        "accountId": 2,
        "sftpDomain": "sftp.pressable.com",
        "siteId": 1,
        "siteName": "my-presssable-net",
        "username": "my-presssable-net",
        "owner": true,
        "email": "johndoe@pressable.dev"
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Reset SFTP User Password

Reset an FTP user password for the specified user and site.

Request

curl --location --request POST 'https://my.pressable.com/v1/sites/1/ftp/password/my-presssable-net' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf'

Parameters

ID of the site for which to reset the FTP user password
site_id (required)
integer($int64)
(path)
Username of the site FTP user for which to reset the password
username (required)
string
(path)

Response

{
    "message": "Success",
    "data": "076b2818de6e39",
    "errors": null
}

Responses

Number
Message
Code
200
Success

Jetpack License Information

Get the Jetpack license information for the specified site.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/jetpack' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'

Parameters

ID of the site for which to get the Jetpack license information
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "id": 948,
        "siteId": 1,
        "licenseKey": "premium_5bc9f55f12",
        "issuedAt": 1643659537,
        "revokedAt": null
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Set Jetpack License

When setting the Jetpack license on your site, the license will be set in the WP Options table for your site.

More information:https://pressable.com/knowledgebase/what-is-the-jetpack-set-license-button

Request

curl --location --request POST 'https://my.pressable.com/v1/sites/1/jetpack' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'

Parameters

ID of the site for which to set the Jetpack license
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": null,
    "errors": null
}

Responses

Number
Message
Code
200
Success

Statistics

Get a list of statistics for a site. Data is updated once daily.

Statistical Data

  • File System disk usage in bytes
  • Database disk usage in bytes
  • Page Views
    • People - Unique Visits
    • Views - Total Page Views

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/statistics' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'

Parameters

ID of the site to which to get the statistics
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "id": 1,
        "databaseUsageBytes": 0,
        "fileSystemUsageBytes": 0,
        "pageViews": {
            "today": {
                "people": 0,
                "views": 0
            },
            "yesterday": {
                "people": 0,
                "views": 0
            },
            "currentMonth": {
                "people": 0,
                "views": 0
            },
            "lastMonth": {
                "views": 0,
                "people": 0
            },
            "twoMonthsAgo": {
                "views": 0,
                "people": 0
            }
        }
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Add Tags

Add tags to your site. Tags allow you to add context to your sites and you can use them to define what your sites are related to.

Tags added to your site are not added to your collaborators tags, inorder to add a tag for a collaborator to see you must add it through the collaborator site tag endpoints.

Tag Names(array) (required)

Request

curl --location --request POST 'https://my.pressable.com/v1/sites/1/tags' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz' \
--header 'Content-Type: application/json' \
--data-raw '{
  "tag_names": [
    "paper", "plastic"
  ]
}'

Parameters

ID of the site
site_id (required)
integer($int64)
(path)
Name of the tag to add to the site
data (required)
(body)

Response

{
    "message": "Success",
    "data": {
        "id": 1,
        "created": "2022-01-31T20:05:30.000Z",
        "accountId": 2,
        "clonedFromId": null,
        "collaboratorsCount": 3,
        "datacenterCode": "DFW",
        "datacenterName": "Dallas, TX, USA",
        "displayName": "pressable.com",
        "domainsCount": 2,
        "ecommerce": false,
        "favorite": false,
        "ipAddress": "199.16.172.38",
        "ipAddressOne": "199.16.172.38",
        "ipAddressTwo": "199.16.173.236",
        "name": "my-presssable-net",
        "state": "live",
        "url": "pressable.com",
        "staging": false,
        "sftpDomain": "sftp.pressable.com",
        "phpVersion": null,
        "tags": [
            {
                "id": 1357,
                "name": "Halo 3: ODST"
            },
            {
                "id": 2605,
                "name": "paper"
            },
            {
                "id": 2606,
                "name": "plastic"
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Created

Remove Tags

Remove tags from your site.

Tags removed from your site are not removed from your collaborators tags, inorder to remove a tag for a collaborator you must remove it through the collaborator site tag endpoints.

Tag Ids(array) (required)

Request

curl --location --request DELETE 'https://my.pressable.com/v1/sites/1/tags' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf' \
--header 'Content-Type: application/json' \
--data-raw '{
  "tag_ids": [
    2605,2606
  ]
}'

Parameters

ID of the site
site_id (required)
integer($int64)
(path)
ID(s) of the tags to remove (array)
data (required)
(body)

Response

{
    "message": "Success",
    "data": {
        "id": 1,
        "created": "2022-01-31T20:05:30.000Z",
        "accountId": 2,
        "clonedFromId": null,
        "collaboratorsCount": 3,
        "datacenterCode": "DFW",
        "datacenterName": "Dallas, TX, USA",
        "displayName": "pressable.com",
        "domainsCount": 2,
        "ecommerce": false,
        "favorite": false,
        "ipAddress": "199.16.172.38",
        "ipAddressOne": "199.16.172.38",
        "ipAddressTwo": "199.16.173.236",
        "name": "my-presssable-net",
        "state": "live",
        "url": "pressable.com",
        "staging": false,
        "sftpDomain": "sftp.pressable.com",
        "phpVersion": null,
        "tags": [
            {
                "id": 1357,
                "name": "Halo 3: ODST"
            }
        ]
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Note List

Get the notes attached to the requested site.

Additional accepted parameters include “per_page” and "page".

  • per_page: the amount of notes returned in a response
  • page: the page of the response

When paginating additional information will be placed in the response regarding paging information:

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/notes' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf'

Parameters

ID of the site
id (required)
integer($int64)
(path)
Data used to get notes for a site
data (required)
(body)

Response

{
    "message": "Success",
    "data": null,
    "page": {
        "currentPage": 1,
        "nextPage": null,
        "lastPage": 1,
        "perPage": 20,
        "totalItems": 0
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Add Note

Add notes to your site.

Request

curl --location --request POST 'https://my.pressable.com/v1/sites/1/notes' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf' \
--header 'Content-Type: application/json' \
--data-raw '{
  "subject": "A note created by the Pressable API",
  "body": "This is the main content of the note."
}'

Parameters

ID of the site
id (required)
integer($int64)
(path)
Data used to get notes for a site
data (required)
(body)

Response

{
    "message": "Success",
    "data": {
        "id": 8,
        "author": "johndoe@pressable.dev",
        "subject": "A note created by the Pressable API",
        "body": "This is the main content of the note.",
        "created": "2022-02-18T17:34:45.000Z",
        "updated": "2022-02-18T17:34:45.000Z"
    },
    "errors": null
}

Responses

Number
Message
Code
200
Created

Get Note

Get specified note for site.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/notes/8' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf'

Parameters

ID of the site
site_id (required)
integer($int64)
(path)
ID of the note
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": {
        "id": 8,
        "author": "johndoe@pressable.dev",
        "subject": "A note created by the Pressable API",
        "body": "This is the main content of the note.",
        "created": "2022-02-18T17:34:45.000Z",
        "updated": "2022-02-18T17:34:45.000Z"
    },
    "errors": null
}

Responses

Number
Message
Code
200
Success

Update Note

Update note for your site.

Request

curl --location --request PUT 'https://my.pressable.com/v1/sites/1/notes/8' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf' \
--header 'Content-Type: application/json' \
--data-raw '{
  "subject": "Updated note by the Pressable API",
  "body": "This is the updated content of the note."
}'

Parameters

ID of the site
site_id (required)
integer($int64)
(path)
ID of the note
id (required)
integer($int64)
(path)
Data used to update a note
data (required)
(body)

Response

{
    "message": "Success",
    "data": {
        "id": 8,
        "author": "johndoe@pressable.dev",
        "subject": "Updated note by the Pressable API",
        "body": "This is the updated content of the note.",
        "created": "2022-02-18T17:34:45.000Z",
        "updated": "2022-02-18T17:38:01.000Z"
    },
    "errors": null
}

Responses

Number
Message
Code
200
Updated

Delete Note

Delete a note from your site.

Request

curl --location --request DELETE 'https://my.pressable.com/v1/sites/1/notes/8' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf'

Parameters

ID of the site
site_id (required)
integer($int64)
(path)
ID of the note
id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": null,
    "errors": null
}

Responses

Number
Message
Code
200
Success

Reset WP-Admin Password

Reset the site owner's WP-Admin password. If you (account owner) are unable to log into your site’s WordPress dashboard because of a forgotten, or unknown, password, this endpoint can be used to set your WP Admin password to a randomly generated value.

More information:https://pressable.com/knowledgebase/resetting-your-wp-admin-password

Request

curl --location --request PUT 'https://my.pressable.com/v1/sites/1/wordpress/password-reset' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'

Parameters

ID of the site to set wordpress password for
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": "%Y6hDU%-Yu5okh5AvGN",
    "errors": null
}

Responses

Number
Message
Code
200
Success

Get phpMyAdmin URL for Site

Get a time-limited URL for accessing your site's database via phpMyAdmin. Only request the URL when you are ready for it to be used. We recommend requesting the URL and redirecting to the URL in the response as soon as possible.

Request

curl --location --request GET 'https://my.pressable.com/v1/sites/1/wordpress/phpmyadmin' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz'

Parameters

ID of the site to get the phpMyAdmin URL for
site_id (required)
integer($int64)
(path)

Response

{
    "message": "Success",
    "data": "https://pressable.com/_pma_login?timestamp=1646159015&nonce=202733835103&token=c47c...6b938",
    "errors": null
}

Responses

Number
Message
Code
200
Success

Webhooks

Webhooks offer a way to find out when certain events occur within the My Pressable Control Panel. Adding a webhook URL allows you to subscribe to events and we will POST data to the URL you provide.

Currently, the only events being sent via webhooks are site created events.

Webhooks are asynchronous events, but please DO NOT rely on webhooks for events that are time sensitive.

You should accept a webhook request by returning an HTTP "200 OK" response as quickly as possible from your endpoint. We attempt to send each webhook event 10 times before giving up.

Webhook URLs must use HTTPS protocol

Webhook Verification

Using your Account Shared Key and a HMAC SHA 256 signature that is calculated and sent with the Webhook, you can verify the contents of a Webhook as being from Pressable and un-tampered.

Example code for verifying webhooks written for Node.js and PHP.

Webhook Testing

Try using ngrok , or UltraHook , to create webhook test HTTPS URLs, allowing you to inspect the webhook body and headers from localhost.

Response

{
    "event": "site_created",
    "site": {
        "id": 1,
        "state": "live"
    }
}

Errors

400 Response

{
    "message": "There was a problem processing your request.",
    "data": null,
    "errors": [
        "Message"
    ]
}
Error Code
Meaning
400
Bad Request

401 Response

No response body
Error Code
Meaning
401
Unauthorized

404 Response

{
    "message": "We could not locate the requested resources.",
    "data": null,
    "errors": null
}
Error Code
Meaning
404
Not Found

500 Response

{
    "message": "An internal error occurred while processing your request. Please try again.",
    "data": null,
    "errors": null
}
Error Code
Meaning
500
Internal Server Error