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
Authentication provides an access token in the response that is required for making requests to the API. Access tokens are active for 1-hour, you should request a new token before the current token expires. 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>"
Request
curl --location --request POST 'https://my.pressable.com/auth/token' \
--form 'grant_type="client_credentials"' \
--form 'client_id="QbWIe7vxfNzZ1vZ7_YFIDNm_NCD7b5X43A68QX4qfzk"' \
--form 'client_secret="V8uqwz5sL0PdNVm8MUNo5WfdGdm_s1g4BMYSVF47H4k"'
POST Data
Response
{
"access_token": "tXJSK-RX1GxSPyjLNvz7TkXwl1SuWoKgp4mwQYg5GjM",
"token_type": "Bearer",
"expires_in": 3599,
"scope": "authorized",
"created_at": 1686949418,
"id": 1,
"name": "John Doe",
"email": "johndoe@pressable.dev",
"gravatar": "https://www.gravatar.com/avatar/3b0e9a78b5621fce924f7ce107180970371cf75f565dfaa5e4babe2e4866422a?d=mp",
"scopes": [
"authorized",
"owner"
]
}
Revoke Access Token
Revoke an access token to stop the access token from being able to make API requests.
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"' \
POST Data
Response
No response body
Account
Account profile and settings information.
Account Details
Get your account profile information.
Request
curl --location --request GET 'https://my.pressable.com/v1/account' \
--header 'Authorization: Bearer cjh02WI6u4j4QpKZeKFCAGF9uLINWTXlj9y8DnJskv4'
Parameters
Response
{
"message": "Success",
"data": {
"affiliate": false,
"collaboratorCount": 0,
"email": "johndoe@pressable.dev",
"gravatar": "https://www.gravatar.com/avatar/3b0e9a78b5621fce924f7ce107180970371cf75f565dfaa5e4babe2e4866422a?d=mp",
"maxSites": 10,
"name": "John Doe",
"organization": "Personal",
"pageViews": {
"allTime": {
"people": 0,
"views": 0
},
"lastTwoYearsIsAllTime": {
"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": 1008,
"defaultPhpVersion": "8.1",
"defaultDatacenter": null,
"recent_activity": [
{
"created": "2023-06-14T20:11:34.000Z",
"createdBy": {
"id": 2,
"created": "2023-06-14T20:11:34.000Z",
"email": "johndoe@pressable.dev",
"name": "John Doe",
"phoneNumber": "5551111510",
"organization": null,
"gravatar": "https://www.gravatar.com/avatar/3b0e9a78b5621fce924f7ce107180970371cf75f565dfaa5e4babe2e4866422a?d=mp"
},
"type": "Account",
"message": "Test Event 10"
},
{
"created": "2023-06-14T20:11:34.000Z",
"createdBy": {
"id": 2,
"created": "2023-06-14T20:11:34.000Z",
"email": "johndoe@pressable.dev",
"name": "John Doe",
"phoneNumber": "5551111510",
"organization": null,
"gravatar": "https://www.gravatar.com/avatar/3b0e9a78b5621fce924f7ce107180970371cf75f565dfaa5e4babe2e4866422a?d=mp"
},
"type": "Account",
"message": "Test Event 9"
},
{
"created": "2023-06-14T20:11:34.000Z",
"createdBy": {
"id": 2,
"created": "2023-06-14T20:11:34.000Z",
"email": "johndoe@pressable.dev",
"name": "John Doe",
"phoneNumber": "5551111510",
"organization": null,
"gravatar": "https://www.gravatar.com/avatar/3b0e9a78b5621fce924f7ce107180970371cf75f565dfaa5e4babe2e4866422a?d=mp"
},
"type": "Account",
"message": "Test Event 8"
},
{
"created": "2023-06-14T20:11:34.000Z",
"createdBy": {
"id": 2,
"created": "2023-06-14T20:11:34.000Z",
"email": "johndoe@pressable.dev",
"name": "John Doe",
"phoneNumber": "5551111510",
"organization": null,
"gravatar": "https://www.gravatar.com/avatar/3b0e9a78b5621fce924f7ce107180970371cf75f565dfaa5e4babe2e4866422a?d=mp"
},
"type": "Account",
"message": "Test Event 7"
},
{
"created": "2023-06-14T20:11:34.000Z",
"createdBy": {
"id": 2,
"created": "2023-06-14T20:11:34.000Z",
"email": "johndoe@pressable.dev",
"name": "John Doe",
"phoneNumber": "5551111510",
"organization": null,
"gravatar": "https://www.gravatar.com/avatar/3b0e9a78b5621fce924f7ce107180970371cf75f565dfaa5e4babe2e4866422a?d=mp"
},
"type": "Account",
"message": "Test Event 6"
}
]
},
"errors": null
}
Responses
200
Success
Set Account PHP Version
Set a default PHP version for all new sites created in your account.
Valid PHP Versions:8.1 and 8.2
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.2"
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
200
Success
Set Account Datacenter
Set a default Datacenter for all new sites created in your account.
Valid Datacenter Codes:AMS or BUR or DCA or DFW or null
Setting a datacenter to null will remove your default datacenter and new sites will be created using the "No Preference" setting or the datacenter selected during site creation.{
"datacenter_code": null
}
Request
curl --location --request PUT 'https://my.pressable.com/v1/account' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw' \
--header 'Content-Type: application/json' \
--data-raw '{
"datacenter_code": "BUR"
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
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
Response
{
"message": "Success",
"data": [
{
"id": 4,
"created": "2021-10-15T15:13:08.000Z",
"updated": "2021-10-15T15:13:08.000Z",
"accountId": 1,
"email": "tomdoe@pressable.dev",
"siteId": 1223013,
"state": "active",
"wpUsername": "tomdoe@pressable.dev",
"name": "Tom Doe",
"siteName": "my-presssable-net",
"roles": [
"download_backups",
"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"
]
},
{
"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": "clairedoe@pressable.dev",
"name": "Claire Doe",
"siteName": "jittery-crib-4894d78ee4",
"roles": [
"download_backups",
"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"
]
},
],
"errors": null
}
Responses
200
Success
Get Collaborator
Get collaborator information for the specified collaborator.
Request
curl --location --request GET 'https://my.pressable.com/v1/collaborators/{id}' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw'
Parameters
{
"message": "Success",
"data": {
"id": 757,
"created": "2023-05-12T21:43:31.000Z",
"updated": "2023-05-12T21:43:31.000Z",
"accountId": 1419361,
"email": "clairedoe@pressable.dev",
"siteId": 1268,
"state": "active",
"wpUsername": "clairedoe@pressable.dev",
"name": "clairedoe@pressable.dev",
"siteName": "mynewsite",
"roles": [
"download_backups",
"manage_dns",
"manage_git",
"manage_notes",
"manage_performance",
"php_my_admin_access",
"restore_site",
"sftp_access",
"update_site_custom_name",
"update_site_php_version",
"update_site_wordpress_version",
"wp_access"
]
},
"errors": null
}
Responses
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 that the requester owns, or where it has create_collaborator permissions
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
- php_my_admin_access
- plugin_management_access
- reset_collaborator_password
- restore_site
- sftp_access
- update_site_custom_name
- update_site_php_version
- update_site_wordpress_version
- wp_access
- Collaborators with the create_collaborator role can add other collaborators with all permissions.They can also update other collaborator's permissions.
- If wp_access is removed during a mass update action, Pressable will attempt to delete the WordPress user with this collaborator's email for the given sites. Posts credited to this user will be reassigned to the next available WordPress admin.
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
Responses
Response
{
"message": "Collaborator creation scheduled for 2 sites",
"data": null,
"errors": null
}
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.
Delete WP User
- Delete WP User must be a boolean.
- Defaults to false
- If true, Pressable will attempt to delete the WordPress user that matches this collaborator's email.
- If the WordPress user in question owns any post, authorship will get reassigned to the oldest WordPress admin available.
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",
"delete_wp_user": true,
"siteIds": [
10, 20, 50
]
}'
Parameters
Response
{
"message": "Collaborator removal scheduled for 3 sites",
"data": null,
"errors": null
}
Responses
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/{collaborator_id}/site' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw'
Parameters
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": "8.2",
"tags": []
},
"errors": null
}
Responses
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/{collaborator_id}/site/tags' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw' \
--header 'Content-Type: application/json' \
--data-raw '{
"tag_names": [
"paper", "plastic"
]
}'
Parameters
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": "8.2",
"tags": [
{
"id": 2601,
"name": "paper"
},
{
"id": 2602,
"name": "plastic"
}
]
},
"errors": null
}
Responses
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/{collaborator_id}/site/tags' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw' \
--header 'Content-Type: application/json' \
--data-raw '{
"tag_ids": [
2601, 2602
]
}'
Parameters
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": "8.2",
"tags": []
},
"errors": null
}
Responses
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/{email_address}/sites' \
-- header 'Content-Type: application/json' \
--header 'Authorization: Bearer cdtcCU9RTo_WhgW2_ik7I22' \
--data '{
"tag_name": "fish",
"per_page": 20,
"page": 1
}'
Parameters
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": "8.2",
"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": "8.2",
"tags": []
}
]
},
"page": {
"currentPage": 1,
"nextPage": 2,
"lastPage": 65,
"perPage": 20,
"totalItems": 1297
},
"errors": null
}
Responses
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/{email_address}/sites/{site_id}' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw'
Parameters
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": "8.2",
"tags": []
}
]
},
"errors": null
}
Responses
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/{email_address}/sites/{site_id}/favorite' \
--header 'Authorization: Bearer 9m11x6zrCUe7SKMME2dKjF4DrUGHTS8CC6rk-z1_P_M'
Parameters
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": "8.2",
"tags": []
}
]
},
"errors": null
}
Responses
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/{email_address}/sites/{site_id}/favorite' \
--header 'Authorization: Bearer 9m11x6zrCUe7SKMME2dKjF4DrUGHTS8CC6rk-z1_P_M'
Parameters
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": "8.2",
"tags": []
}
]
},
"errors": null
}
Responses
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/{email_address}/sites/{site_id}/tag' \
--header 'Authorization: Bearer 9m11x6zrCUe7SKMME2dKjF4DrUGHTS8CC6rk-z1_P_M' \
--header 'Content-Type: application/json' \
--data-raw '{
"tag_names": [
"paper", "plastic"
]
}'
Parameters
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": "8.2",
"tags": [
{
"id": 2603,
"name": "paper"
},
{
"id": 2604,
"name": "plastic"
}
]
}
]
},
"errors": null
}
Responses
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/{email_address}/sites/{site_id}/tag' \
--header 'Authorization: Bearer 9m11x6zrCUe7SKMME2dKjF4DrUGHTS8CC6rk-z1_P_M' \
--header 'Content-Type: application/json' \
--data-raw '{
"tag_ids": [
2603, 2604
]
}'
Parameters
{
"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": "8.2",
"tags": []
}
]
},
"errors": null
}
Responses
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
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
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/{zone_id}/records' \
--header 'Authorization: Bearer ob9TDvE07rXgUpVVZdNCNWIUYCDVghy8dZr1u2gH-o4'
Parameters
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
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/{zone_id}/records' \
--header 'Authorization: Bearer ob9TDvE07rXgUpVVZdNCNWIUYCDVghy8dZr1u2gH-o4' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "CNAME",
"name": "newsite2",
"value": "newsite2",
"ttl": 0
}'
Parameters
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
200
Created
Delete Record
Delete a DNS record from a zone.
Request
curl --location --request DELETE 'https://my.pressable.com/v1/zones/{zone_id}/records/{id}' \
--header 'Authorization: Bearer ob9TDvE07rXgUpVVZdNCNWIUYCDVghy8dZr1u2gH-o4'
Parameters
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
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/{zone_id}/providers' \
--header 'Authorization: Bearer ki1ssXMLyJ-NPv7nInwXA4-Z6vYK4_kPTw8jHqU0eZA' \
--header 'Content-Type: application/json' \
--data-raw '{
"provider": "zoho"
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
200
Created
Retry SSL Certificate Provisioning
Forces a retry of SSL certificate provisioning of A Records. This is a way to make sure SSL for an A Record is reprovisioned if it is not working properly.
Request
curl --location --request PUT 'https://my.pressable.com/v1/zones/{zone_id}/records/{id}/ssl' \
--header 'Authorization: Bearer ki1ssXMLyJ-NPv7nInwXA4-Z6vYK4' \
--header 'Content-Type: application/json' \
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
{
"message": "There was a problem processing your request.",
"data": null,
"errors": [
"SSL can only be retried on A records"
]
}
Responses
200
Success
400
There was a problem processing your request
Edge Cache
Edge caching is a method of storing website data closer to users, reducing latency and network traffic. It's crucial for faster content delivery and improved user experience, particularly for geographically dispersed users.
Edge Cache provides performance improvements, particularly to the Time to First Byte (TTFB), by serving page cache directly from the closest server available to a site’s visitors.
Toggle Edge Cache
The ability to toggle edge cache allows you to enable or disable caching of your site's content at edge locations.
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/{id}/edge-cache' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh' \
--header 'Content-Type: application/json'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
200
Success
Purge Edge Cache
Purging edge cache allows you to remove stored content at edge locations, ensuring the delivery of updated or corrected content to users. This is critical when changes are made to your site that need to be reflected immediately.
Request
curl --location --request DELETE 'https://my.pressable.com/v1/sites/{id}/edge-cache' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh' \
--header 'Content-Type: application/json'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
200
Success
On-Demand Backups
Create your own backups of your site's filesystem and database.
You are limited to 3 on-demand filesystem backups and 3 on-demand database backups. If you reach the limit, you'll need to delete one before you can create a new one. On-demand backups are automatically deleted after 30 days for the latest backup taken and 7 days for the oldest backup taken.
On-Demand Backup List
Get a list of on-demand backups for the specified site.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{id}/ondemand-backups' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh' \
--header 'Content-Type: application/json'
Parameters
Response
{
"message": "Success",
"data": [
{
"id": "50564",
"siteId": 50,
"completed": 1682954943,
"status": "completed",
"type": "db",
"bytes": "9278",
"requested": 1682954869,
"backupTimestamp": "2023-05-01 15:29:03",
"createdBy": "John Doe (user@user.com)",
"removedIn": "29 days and 21 hours from now",
"deleteAt": 1685546944
},
{
"id": "505641",
"siteId": 50,
"completed": 1682954884,
"status": "completed",
"type": "db",
"bytes": "92786",
"requested": 1682954863,
"backupTimestamp": "2023-05-01 15:28:04",
"createdBy": "John Doe (user@user.com)",
"removedIn": "6 days and 21 hours from now",
"deleteAt": 1683559744
},
{
"id": "5053",
"siteId": 50,
"completed": 1682954644,
"status": "completed",
"type": "fs",
"bytes": "846297",
"requested": 1682954625,
"backupTimestamp": "2023-05-01 15:24:04",
"createdBy": "John Doe (user@user.com)",
"removedIn": "6 days and 22 hours from now",
"deleteAt": 1683562925
}
],
"errors": null
}
Create On-Demand Backup
Create an on-demand backup for the specified site.
You are limited to 3 on-demand filesystem backups and 3 on-demand database backups. If you reach the limit, you'll need to delete one before you can create a new one.
Note: The response body will not return a backup ID until the backup has completed. We will provide a requestId. You can use the on-demand backups creation webhook to know when the backup has completed.
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/{id}/ondemand-backups' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh' \
--header 'Content-Type: application/json' \
--data '{
"backup_type": "fs"
}'
Parameters
Response
{
"message": "Success",
"data": {
"id": null,
"requestId": 50564,
"siteId": 1223013,
"completed": null,
"status": "creating",
"type": "fs",
"bytes": null,
"requested": 1682966700,
"backupTimestamp": null,
"createdBy": "John Doe (user@user.com)",
"removedIn": "30 days and 0 hours from now",
"deleteAt": 1685558700
},
"errors": null
}
Get On-Demand Backup
Get the details for a specific on-demand backup attached to the specified site.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{site_id}/ondemand-backups/{id}' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh' \
--header 'Content-Type: application/json'
Parameters
Response
{
"message": "Success",
"data": {
"id": "50564",
"siteId": 50,
"completed": 1682954943,
"status": "completed",
"type": "db",
"bytes": "9278",
"requested": 1682954869,
"backupTimestamp": "2023-05-01 15:29:03",
"createdBy": "John Doe (user@user.com)",
"removedIn": "29 days and 21 hours from now",
"deleteAt": 1685546944
},
"errors": null
}
Download On-Demand Backup
Download the specified on-demand backup attached to the specified site.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{site_id}/ondemand-backups/{id}/download' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh' \
--header 'Content-Type: application/json'
Parameters
Response
{
"message": "string",
"errors": [
"string"
]
}
Responses
200
Bzipped tar archive of filesystem backup or SQL text backup of database backup
Delete On-Demand Backup
Delete a specific on-demand backup attached to the specified site. The status of the site is set to `deleting` and the backup is removed from the site.
Note: This action is irreversible. The backup cannot be restored once it is deleted. You can monitor the on-demand backup deleted webhook to get notified when the backup is deleted.
Request
curl --location --request DELETE 'https://my.pressable.com/v1/sites/{site_id}/ondemand-backups/{id}' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh' \
--header 'Content-Type: application/json'
Parameters
Response
{
"message": "Success",
"data": {
"id": "50564",
"siteId": 50,
"completed": 1682954943,
"status": "deleting",
"type": "db",
"bytes": "9278",
"requested": 1682954869,
"backupTimestamp": "2023-05-01 15:29:03",
"createdBy": "John Doe (user@user.com)",
"removedIn": "29 days and 21 hours from now",
"deleteAt": 1685546944
},
"errors": null
}
Plugins
Plugins are powerful extensions for WordPress sites that enhance functionality and enable customizations. These modular add-ons allow users to seamlessly integrate new features, such as contact forms, social media integration, SEO optimization, and more, without the need for extensive coding knowledge.
With these API endpoints, you can manage plugins for your sites.
Plugin List
Get a list of plugins for the specified site.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{id}/plugins' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh' \
--header 'Content-Type: application/json'
Parameters
Response
{
"message": "Success",
"data": [
{
"name": "akismet",
"title": "Akismet Anti-Spam",
"description": "Used by millions, Akismet is quite possibly the best way in the world to protect your blog from spam.",
"status": "active",
"update": "none",
"version": "5.1",
"update_version": null
},
{
"name": "jetpack",
"title": "Jetpack",
"description": "Security, performance, and marketing tools made by WordPress experts.",
"status": "active",
"update": "version higher than expected",
"version": "12.2-a.9",
"update_version": null
},
{
"name": "jetpack-protect",
"title": "Jetpack Protect",
"description": "Security tools that keep your site safe and sound, from posts to plugins.",
"status": "active",
"update": "none",
"version": "1.4.0",
"update_version": null
},
{
"name": "pressable-onepress-login",
"title": "Pressable OnePress Login",
"description": "Pressable OnePress Login for the MyPressable Control Panel.",
"status": "active",
"update": "none",
"version": "1.3.1",
"update_version": null
},
{
"name": "quiz-maker",
"title": "Quiz Maker",
"description": "This plugin allows you make unlimited number of quizes.",
"status": "active",
"update": "available",
"version": "6.4.2.7",
"update_version": "6.4.3.1"
},
{
"name": "advanced-cache.php",
"title": "",
"description": "Advanced caching plugin.",
"status": "dropin",
"update": "none",
"version": "",
"update_version": null
},
{
"name": "object-cache.php",
"title": "Memcached",
"description": "External object cache.",
"status": "dropin",
"update": "none",
"version": "",
"update_version": null
}
],
"errors": null
}
Install and Activate Plugins
To enhance your WordPress site, install and activate plugins to add new features, functionality, and customization options effortlessly.
This endpoint installs and activates a plugin for the specified site. Job Queues are used to install and activate the plugins. Please use our Plugin related Webhooks to know if the plugin was installed and activated successfully.
Plugins can be installed from the WordPress plugin repository or from a custom URL.
To install a plugin from the WordPress plugin repository, use the plugin name (slug). If a slug is used the WordPress API is used to determine if the plugin slug is valid. To install a plugin from a custom URL, use the HTTPS URL to the plugin zip file.
The plugin version is an optional parameter. If not specified, the latest version of the plugin will be installed.
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/{id}/plugins' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzTBKh' \
--header 'Content-Type: application/json' \
--data '{
"plugins": [
{
"path": "google-analytics-for-wordpress"
},
{
"path": "wpforms-lite",
"version": "1.8.0.2"
},
{
"path": "https://github.com/pressable/pressable-maintenance-mode/archive/refs/tags/v1.0.2.zip"
}
]
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Update Plugins
Regularly updating plugins is crucial for WordPress sites to ensure optimal performance, security, and compatibility with the latest features and enhancements.
This endpoint updates plugins for the specified site. Job Queues are used to update the plugins. Please use our Plugin related Webhooks to know if the plugin was updated successfully.
Plugins are updated using the plugin name (slug).
The plugin version is an optional parameter. If not specified, the plugin will be updated to the latest version.
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/{id}/plugins' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzTBKh' \
--header 'Content-Type: application/json' \
--data '{
"plugins": [
{
"path": "google-analytics-for-wordpress"
},
{
"path": "wpforms-lite",
"version": "1.8.1.2"
}
]
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Deactivate Plugins
Deactivating plugins on WordPress sites allows for troubleshooting, prevents conflicts, and temporarily disables specific functionalities without removing the plugin entirely.
This endpoint deactivates plugins for the specified site. Job Queues are used to deactivate the plugins. Please use our Plugin related Webhooks to know if the plugin was deactivated successfully.
Plugins are deactivated using the plugin name (slug).
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/{id}/plugins/deactivate' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzTBKh' \
--header 'Content-Type: application/json' \
--data '{
"plugins": [
{
"path": "google-analytics-for-wordpress"
},
{
"path": "wpforms-lite"
}
]
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Activate Plugins
Activating previously deactivated plugins restores desired functionalities, expands features, and re-enables customizations.
This endpoint activates plugins for the specified site. Job Queues are used to activate the plugins. Please use our Plugin related Webhooks to know if the plugin was activated successfully.
Plugins are activated using the plugin name (slug).
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/{id}/plugins/activate' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzTBKh' \
--header 'Content-Type: application/json' \
--data '{
"plugins": [
{
"path": "google-analytics-for-wordpress"
},
{
"path": "wpforms-lite"
}
]
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Delete Plugins
Deleting unnecessary plugins from WordPress sites enhances performance, reduces security risks, and minimizes conflicts, resulting in a streamlined and efficient website environment.
This endpoint deletes plugins for the specified site. Job Queues are used to delete the plugins. Please use our Plugin related Webhooks to know if the plugin was deleted successfully.
Plugins are deleted using the plugin name (slug).
Request
curl --location --request DELETE 'https://my.pressable.com/v1/sites/{id}/plugins' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzTBKh' \
--header 'Content-Type: application/json' \
--data '{
"plugins": [
{
"path": "google-analytics-for-wordpress"
},
{
"path": "wpforms-lite"
}
]
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
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,
"per_page": 1,
"page": 2
}'
Parameters
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,
"edgeCache": "enabled",
"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": "8.2",
"wordpressVersion": "Latest Release (Beta)",
"tags": [
{
"id": 1357,
"name": "Halo 3: ODST"
}
],
"wpEnvironmentType":"production",
"lightWeight404": true
},
{
"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,
"edgeCache": "disabled",
"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": "8,2",
"wordpressVersion": "Current Stable Release (6.2)",
"tags": [],
"wpEnvironmentType":"production",
"lightWeight404": false
},
{
"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,
"edgeCache": "disabled",
"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": "8,2",
"wordpressVersion": "Current Stable Release (6.2)",
"tags": [
{
"id": 744,
"name": "Super Mario Bros. 3"
}
],
"wpEnvironmentType":"staging",
"lightWeight404": false
}
],
"page": {
"currentPage": 1,
"nextPage": 2,
"lastPage": 66,
"perPage": 20,
"totalItems": 1309
},
"errors": null
}
Responses
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: 7.4, 8.1 or 8.2
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
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,
"edgeCache": "disabled",
"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": null,
"wordpressVersion": "Current Stable Release (6.2)",
"tags": [],
"wpEnvironmentType": "production",
"lightWeight404": false
},
"errors": null
}
Responses
201
Created
Validate Site Name
Use this endpoint to check if a site name is valid before attempting to create a site.
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/validate' \
--header 'Authorization: Bearer cjh02WI6u4j4QpKZeKFCAGF9uLINWTXlj9y8'
Parameters
Response
{
"message": "Site name is valid",
"data": {
"valid": true
},
"errors": null
}
{
"message": "Site name has already been taken",
"data": {
"valid": false
},
"errors": null
}
{
"message": "Site name is not formatted correctly. Periods, spaces, and other special characters are not permitted in site names. Dashes are fine, but name cannot start or end with a dash. Name must be at least 3 characters in length",
"data": {
"valid": false
},
"errors": null
}
Responses
200
Site name is valid
200
Site name has already been taken
200
Site name is not formatted correctly. Periods, spaces, and other special characters are not permitted in site names. Dashes are fine, but name cannot start or end with a dash. Name must be at least 3 characters in length
Get Site
Get site information and settings.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{id}' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh'
Parameters
Response
{
"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,
"edgeCache": "disabled",
"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
},
"lastTwoYearsIsAllTime": {
"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": "8.2",
"wordpressVersion": "Current Stable Release (6.2)",
"sftpDomain": "sftp.pressable.com",
"state": "live",
"url": "pressable.com",
"wordpressLoginUrl": "pressable.com/wp-admin",
"staging": false,
"tags": [
{
"id": 1357,
"name": "Halo 3: ODST"
}
],
"wpEnvironmentType":"development",
"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": null
},
"errors": null
}
Responses
200
Success
Update Site
Update the Display Name, PHP Version or WP Environment Type 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: 7.4, 8.0, 8.1 or 8.2
WP Environment Type
- Update your site's environment type. After making the request, please give the system a bit of time to make the change. It will be added to the job queue and processed as soon as possible.
- Valid WP Environment Types: local, development, staging or production
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/{id}' \
--header 'Authorization: Bearer cjh02WI6u4j4QpKZeKFCAGF9uLINWTXlj9y8Dn' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Five Hundred Site",
"php_version": "8.0",
"wp_environment_type": "development"
}'
Parameters
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,
"edgeCache": "disabled",
"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",
"wordpressVersion": "Current Stable Release (6.2)",
"tags": [
{
"id": 354,
"name": "Clannad"
}
],
"wpEnvironmentType": "development",
"lightWeight404": false
},
"errors": null
}
Responses
200
Updated Site Details
Delete Site
Delete a site with the specified id.
Request
curl --location --request DELETE 'https://my.pressable.com/v1/sites/{id}' \
--header 'Authorization: Bearer cjh02WI6u4j4QpKZeKFCAGF9uLINWTXlj9y8Dn'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
200
Success
Search Sites
Search for sites linked to your account by using our approved keys for filtering. Provide the filters as an array of key-value pairs within the 'filters' parameter.
- key: The property you want to filter by.
- value: The value you want to match for the provided property.
Valid Filter Keys
- domain
- name
- state
- wordpress_version
- php_version
- datacenter_code
Note: At least one filter must be provided in the request inorder to get a response. The response will include pagination information.
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/search' \
--header 'Authorization: Bearer zftCxjbICWZE8eCIXo3sHgcKSzT8BKh' \
--header 'Content-Type: application/json' \
--data-raw '{
"filters": [
{
"key": "name",
"value": "zippy"
},
{
"key": "state",
"value": "deploying"
}
]
}'
Parameters
Response
{
"message": "Success",
"data": [
{
"id": 3,
"name": "zippykidnetworks-net",
"displayName": "zippykidnetworks-net",
"url": "zippykidnetworks-net.mystagingwebsite.com",
"created": "2023-07-05T18:10:15.000Z",
"clonedFromId": null,
"datacenterCode": "DCA",
"datacenterName": "Washington, DC, USA",
"ecommerce": false,
"edgeCache": "disabled",
"ipAddresses": [
"199.16.172.107",
"199.16.173.153"
],
"lightWeight404": false,
"phpVersion": null,
"sftpDomain": "sftp.pressable.com",
"staging": false,
"state": "deploying",
"wordpressVersion": "Current Stable Version (6.3)",
"wpEnvironmentType": "production"
}
],
"page": {
"currentPage": 1,
"nextPage": null,
"lastPage": 1,
"perPage": 20,
"totalItems": 1
},
"errors": null
}
Responses
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
Response
{
"message": "Success",
"data": [
"wordpress",
"woocommerce"
],
"errors": null
}
Responses
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
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
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
Response
{
"message": "Success",
"data": ["7.4", "8.1", "8.2"],
"errors": null
}
Responses
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 480 Temporarily Unavailable 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/{id}/disable' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3434'
Parameters
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,
"edgeCache": "disabled",
"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.2",
"wordpressVersion": "Current Stable Release (6.2)",
"tags": [
{
"id": 354,
"name": "Clannad"
}
],
"wpEnvironmentType": "development",
"lightWeight404": false
},
"errors": null
}
Responses
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 480 Temporarily Unavailable 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/{id}/enable' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh34'
Parameters
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,
"edgeCache": "disabled",
"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.2",
"wordpressVersion": "Current Stable Release (6.2)",
"tags": [
{
"id": 354,
"name": "Clannad"
}
],
"wpEnvironmentType": "development",
"lightWeight404": false
},
"errors": null
}
Responses
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/{id}/convert' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh34'
Parameters
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,
"edgeCache": "disabled",
"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": "8.2",
"wordpressVersion": "Current Stable Release (6.2)",
"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"
}
],
"wpEnvironmentType": "staging",
"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
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/{site_id}/cache' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh34347g'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
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/{site_id}/cdn' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'
Parameters
Response
{
"message": "Success",
"data": {
"cdnEnabled": true
},
"errors": null
}
Responses
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/{site_id}/cdn' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'
Parameters
Response
{
"message": "Success",
"data": {
"cdnEnabled": true
},
"errors": null
}
Responses
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/{site_id}/cdn' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'
Parameters
Response
{
"message": "Success",
"data": {
"cdnEnabled": false
},
"errors": null
}
Responses
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/{site_id}/cdn' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'
Parameters
Response
{
"message": "Success",
"data": {
"cdnEnabled": true
},
"errors": null
}
Responses
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/{site_id}/object-cache' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
200
Success
Toggle Light Weight 404
Enable or Disable Light Weight 404 handling for a site with the specified id.
If enabled, requests trying to fetch a non-existing static file will receive a light weight 404 response generated by Pressable.
If disabled, requests trying to fetch a non-existing static file will be handled by your WordPress server.
Please note that this applies to requests trying to fetch files with extensions:
.css .gif .eot .jpg .jpeg .js .otf .png .svg .swf .ttf .webm .webp .woff .woff2
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/{site_id}/light_weight_404' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'
Parameters
Response
{
"message": "Success",
"data": {
"lightWeight404Enabled": true
},
"errors": null
}
Responses
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/{site_id}/favorites' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
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/{site_id}/favorites' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
200
Success
Create Site Clone
Create a copy of the specified site.
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/{site_id}/clone' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "five-hundred-clone",
"staging": true,
"datacenter_code": "DCA"
}'
Parameters
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,
"edgeCache": "disabled",
"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,
"wordpressVersion": "Current Stable Release (6.2)",
"tags": [],
"wpEnvironmentType": "staging",
"lightWeight404": false
},
"errors": null
}
Responses
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/{site_id}/backups' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz'
Parameters
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
200
Success
Filesystem Backups List
Get a list of available site filesystem backups for the specified site.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{site_id}/backups/fs' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz'
Parameters
Response
{
"message": "Success",
"data": [
{
"id": "4226768170",
"site_id": 1,
"backup_timestamp": "2022-11-30 00:00:00",
"type": "fs",
"title": "Wed, 30 Nov 2022 00:00:00 UTC (on-demand)",
"formatted_timestamp": "2022-11-30T00:00:00.000Z"
},
{
"id": "4220809902",
"site_id": 1,
"backup_timestamp": "2021-11-29 00:00:00",
"type": "fs",
"title": "Mon, 29 Nov 2021 00:00:00 UTC",
"formatted_timestamp": "2021-11-29T00:00:00.000Z"
},
{
"id": "4214903229",
"site_id": 1,
"backup_timestamp": "2021-11-28 00:00:00",
"type": "fs",
"title": "Sun, 28 Nov 2021 00:00:00 UTC",
"formatted_timestamp": "2021-11-28T00:00:00.000Z"
}
],
"errors": null
}
Responses
200
Success
Database Backups List
Get a list of available site database backups for the specified site.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{site_id}/backups/db' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz'
Parameters
Response
{
"message": "Success",
"data": [
{
"id": "4070338267",
"site_id": 1,
"backup_timestamp": "2022-11-13 18:00:00",
"type": "db",
"title": "Sun, 13 Nov 2022 18:00:00 UTC (on-demand)",
"formatted_timestamp": "2022-11-13T18:00:00.000Z"
},
{
"id": "4070338267",
"site_id": 1,
"backup_timestamp": "2031-11-03 18:00:00",
"type": "db",
"title": "Mon, 03 Nov 2031 18:00:00 UTC",
"formatted_timestamp": "2031-11-03T18:00:00.000Z"
},
{
"id": "4069808072",
"site_id": 1,
"backup_timestamp": "2021-11-03 16:00:00",
"type": "db",
"title": "Wed, 03 Nov 2021 16:00:00 UTC",
"formatted_timestamp": "2021-11-03T16:00:00.000Z"
}
],
"errors": null
}
Responses
200
Success
Get Site Backup
Download a specified site backup
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{site_id}/backups/{backup_id}' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz'
Parameters
Response
Response Stream
Responses
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. Depending on the size of your site, the restore can be as short as a few minutes to a few hours. Select a filesystem and/or database backup from the lists below to restore your website to a previous version backup list. You will receive an email when the restore attempt is finished.
Cross Site Restores
Want to restore to a different site in your account? Simply send the site id for the site you would like the restore placed on. We will replace the site with the backup options you requested.
- restore_on_site_id (optional)
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/{site_id}/restores' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz' \
--header 'Content-Type: application/json' \
--data-raw '{
"filesystem_id": 1234,
"database_id": 5678,
"restore_on_site_id": 45
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
200
Success
Data Sync
Data Sync allows you to replace the filesystem and/or database on your chosen destination site with the data from your source site. However, be aware that this could potentially overwrite more recent transactions on the destination site. Before using this feature, decide on the type of sync you prefer - you can opt to sync just the filesystem, only the database, or both. Use this feature carefully to avoid loss of any important, recent data.
For each type of data you plan to sync (either filesystem or database or both), you'll need to ensure that on-demand backup slots are available for both the destination and source sites.
The destination site will be put into maintenance mode and will be inaccessible for the duration of the sync. Depending on the size of your site, the sync can be as short as a few minutes to a few hours.
Parameters
- from_site_id (required) - this is your source site.
- to_site_id (required) - this is your destination site.
- sync (required) - this must be set to either:
- filesystem
- database
- both
Warning: Use Data Sync with caution. The process will completely overwrite files and/or database on the destination site. For the protection of your sites, we will automatically take a backup of the source site and the destination site in case they need to be restored.
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/sync' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz' \
--header 'Content-Type: application/json' \
--data-raw '{
"from_site_id": 1234,
"to_site_id": 5678,
"sync": "both"
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
200
Success
Collaborator List
Get a list of collaborators for the specified site.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{site_id}/collaborators' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzv'
Parameters
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
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/{site_id}/collaborators' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "waynedoe@pressable.dev",
"roles": [ "clone_site", "update_site_custom_name" ]
}'
Parameters
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",
"roles": [
"clone_site",
"update_site_custom_name"
]
},
"errors": null
}
Responses
200
Created
Get Site Collaborator
Get site collaborator information.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{site_id}/collaborators/{id}' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzv'
Parameters
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
200
Success
Delete Collaborator
Delete a collaborator with the specified id.
Request
curl --location --request DELETE 'https://my.pressable.com/v1/sites/{site_id}/collaborators/{id}' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz' \
--data '{
"delete_wp_user": true
}'
Parameters
- Delete WP User must be a boolean.
- Defaults to false
- If true, Pressable will attempt to delete the WordPress user that matches this collaborator's email.
- If the WordPress user in question owns any post, authorship will get reassigned to the oldest WordPress admin available.
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
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/{site_id}/collaborators/{id}/wp-password-reset' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
Parameters
Response
{
"message": "Success",
"data": "!WGhilzTwgAItI!q_GcyhF_o",
"errors": null
}
Responses
200
Success
Domain List
Get a list of domains for the specified site
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{site_id}/domains' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
Parameters
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
200
Success
Add Domain
Add a new domain to a site.
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/{site_id}/domains' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "newdomain.com"
}'
Parameters
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
201
Created
Get Domain
Get domain information.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{site_id}/domains/{id}' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
Parameters
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
200
Success
Delete Domain
Delete a domain from a site.
Request
curl --location --request DELETE 'https://my.pressable.com/v1/sites/{site_id}/domains/{id}' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
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 PUT 'https://my.pressable.com/v1/sites/{site_id}/domains/{id}/primary' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
Parameters
Response
{
"message": "Success",
"data": {
"id": 15,
"created": "2023-04-17T15:53:38.000Z",
"primary": true,
"name": "www",
"healthy": true,
"dnsConfirmed": true,
"provisioned": true,
"domainName": "pressable.dev",
"ipAddresses": [
"199.16.172.11",
"199.16.173.88"
]
},
"errors": null
}
Responses
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/{site_id}/ftp' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
Parameters
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
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/{site_id}/ftp/{username}' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
Parameters
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
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/{site_id}/ftp/password/{username}' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf'
Parameters
Response
{
"message": "Success",
"data": "076b2818de6e39",
"errors": null
}
Responses
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/{site_id}/jetpack' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
Parameters
Response
{
"message": "Success",
"data": {
"id": 948,
"siteId": 1,
"licenseKey": "premium_5bc9f55f12",
"issuedAt": 1643659537,
"revokedAt": null
},
"errors": null
}
Responses
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/{site_id}/jetpack' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
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/{site_id}/statistics' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
Parameters
Response
{
"message": "Success",
"data": {
"id": 1,
"databaseUsageBytes": 12656507,
"fileSystemUsageBytes": 11981824,
"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
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/{id}/tags' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz' \
--header 'Content-Type: application/json' \
--data-raw '{
"tag_names": [
"paper", "plastic"
]
}'
Parameters
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,
"edgeCache": "enabled",
"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": "8.2",
"wordpressVersion": "Latest Release (Beta)",
"tags": [
{
"id": 1357,
"name": "Halo 3: ODST"
},
{
"id": 2605,
"name": "paper"
},
{
"id": 2606,
"name": "plastic"
}
],
"wpEnvironmentType": "production",
"lightWeight404": true
},
"errors": null
}
Responses
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/{id}/tags' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf' \
--header 'Content-Type: application/json' \
--data-raw '{
"tag_ids": [
2605,2606
]
}'
Parameters
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": "8.2",
"wordpressVersion": "Latest Release (Beta)",
"tags": [
{
"id": 1357,
"name": "Halo 3: ODST"
}
],
"wpEnvironmentType": "production",
"lightWeight404": true
},
"errors": null
}
Responses
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/{id}/notes' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf' \
--data '{
"per_page": 1,
"page": 2
}'
Parameters
Response
{
"message": "Success",
"data": [
{
"id": 418,
"author": "janedoe@pressable.dev",
"editor": "janedoe@pressable.dev",
"subject": "Note Subject",
"body": "Notes content",
"created": "2022-02-14T16:45:43.000Z",
"updated": "2022-02-14T16:45:43.000Z"
}
],
"page": {
"currentPage": 2,
"nextPage": null,
"lastPage": 2,
"perPage": 1,
"totalItems": 2
},
"errors": null
}
Responses
200
Success
Add Note
Add notes to your site.
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/{id}/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
Response
{
"message": "Success",
"data": {
"id": 8,
"author": "johndoe@pressable.dev",
"editor": "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
200
Created
Get Note
Get specified note for site.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{site_id}/notes/{id}' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf'
Parameters
Response
{
"message": "Success",
"data": {
"id": 8,
"author": "johndoe@pressable.dev",
"editor": "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
200
Success
Update Note
Update note for your site.
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/{site_id}/notes/{id}' \
--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
Response
{
"message": "Success",
"data": {
"id": 8,
"author": "johndoe@pressable.dev",
"editor": "janedoe@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
200
Updated
Delete Note
Delete a note from your site.
Request
curl --location --request DELETE 'https://my.pressable.com/v1/sites/{site_id}/notes/{id}' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
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/{site_id}/wordpress/password-reset' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
Parameters
Response
{
"message": "Success",
"data": "%Y6hDU%-Yu5okh5AvGN",
"errors": null
}
Responses
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/{site_id}/wordpress/phpmyadmin' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz'
Parameters
Response
{
"message": "Success",
"data": "https://pressable.com/_pma_login?timestamp=1646159015&nonce=202733835103&token=c47c6b938",
"errors": null
}
Responses
200
Success
Update WordPress Version for Site
Update your WordPress version to one of our available versions. If no version is sent in the request your WordPress version will be toggled between latest (stable) or beta (when available).
Available Versions
latest - Current Stable Version (6.3)
beta - Beta Version
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/{site_id}/wordpress/version' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz' \
--data-raw '{ \
"version": "latest" \
}'
Parameters
Response
{
"message": "Success",
"data": {
"id": 1,
"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.2",
"wordpressVersion": "Current Stable Release (6.2)",
"tags": [],
"wpEnvironmentType": "staging",
"lightWeight404": true
},
"errors": null
}
Responses
200
Success
One Press Login
Creates a one time url to sign-in to one of your WordPress sites as the user specified by the given email.
Please check our Knowledge Base for more information about this feature. In order for this endpoint to work properly, please make surethe following requirements are met:
- Site's account owner must have the OnePress Login to WordPres plugin enabled.
- The user specified by
email
must be a collaborator for the given site and must haveWP_ACCESS
permission. - The user agent value must be an
exact match
compared to the browser that will be used to the visit the generated url. - The generated url must be used within 30 seconds of being generated.
The ideal workflow would involve an end user sending a request to your server, which retrieves the user-agent and proceeds to send a request to Pressable's API with the remaining values. You can use the following examples to retrieve the user-agent from a web request:
PHP:
$_SERVER['HTTP_USER_AGENT']
Node:
var http = require('http')
server = http.createServer(function(req) {
console.log(req.headers['user-agent']);
});
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/{site_id}/one_press_login' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz' \
--header 'Content-Type: application/json' \
--data-raw '{
"email": "some_cool_user@mydomain.com",
"user_agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36"
}'
Parameters
Response
{
"message": "Success",
"data": {
"url": "https://mydomain.com/wp-login.php?mpcp_token=MS00Mzg1OTNlOTYzMjNkMWY3NTEjk4NjYtODU1YWJlMzNmNjEwNI"
},
"errors": null
}
Responses
200
Success
PHP Error Logs
Get a list of a site's PHP logs. These logs can help assist in debugging issues related to PHP on your site. The logs are available for the past 7 days, we respond with 200 log messages per page.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{id}/logs/php' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz' \
--header 'Content-Type: application/json' \
--data-raw '{
"scroll_id": "FGluY2x1ZGVi1CFVU2Fxckbnc=",
"status": "Warning"
}'
Scroll ID
The scroll id string is used to get the next page of data for your request. Any filters sent along with a scroll id will be used when getting the next page of data.
Status Options
Filter by log status. status
can be set to one of either:
User
Warning
Deprecated
Fatal error
Parameters
Response
{
"total_results": null,
"logs": [
{
"message": "cool error!!",
"severity": "User",
"kind": "",
"name": "",
"file": "unknown",
"line": -1,
"timestamp": "2023-02-03T22:15:46.000Z",
"atomic_site_id": 149667564
},
{
"message": "PHP Parse error: Unmatched ')' in /srv/htdocs/throw_error.php on line 4",
"severity": "Parse error",
"kind": "",
"name": "",
"file": "/srv/htdocs/throw_error.php",
"line": 4,
"timestamp": "2023-02-03T22:13:32.000Z",
"atomic_site_id": 149667564
}
],
"scroll_id": "FGluY2x1ZGVfY29udGV4dF91dWlkDnF1ZXJ5VGhlbkZldGNogAgWdGdWQWZTeHBUaGFJTG1fR0E0LVp2dwAAAAABPOLVFnZ6SFlEODV0UUt1bklUWGs0STdjbVEWeVNlaU56eDdRek9WRmhGQjJHZEk2dwAAAAAEdcDJFkhiWDJMaHc0UWdXbXNRME9uQUZLaHcWSUlDQnhTOGtScmlrMFR1OFM3azlFdwAAAAAEV8-iFnRMcHN2OGdMUmR1M0NROWxQeFp6ZGcWTVItdXJuSW1UVXFKZkhLWktIVDdDdwAAAAAEJkfNFn="
}
Responses
200
Success
Web Server Logs
Get a list of a site's web server logs. These logs can help assist in debugging issues related to the server of your site. The logs are available for the past 7 days, we respond with 200 log messages per page.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{id}/logs/server' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz' \
--header 'Content-Type: application/json' \
--data-raw '{
"scroll_id": "FGluY2x1ZGVi1CFVU2Fxckbnc=",
"status": "200",
"request_type": "GET",
"user_ip":"172.12.29.1"
}'
Scroll ID
The scroll id string is used to get the next page of data for your request. Any filters sent along with a scroll id will be used when getting the next page of data.
Request Type
Filter by request type. request_type
can be set to one of either:
GET
POST
PUT
PATCH
DELETE
Status Codes
Filter by status codes. status
can be set to any valid status code of 100 through 599. Multiple status codes can be sent as comma delimited string of codes, such as, status: '200, 202'
User IP
Filter by User IP address using user_ip
.
Parameters
Response
{
"total_results":null,
"logs":[
{
"body_bytes_sent":32,
"cached":"false",
"date":"2023-02-03T19:21:53.162Z",
"http2":"",
"http_host":"fatwombat.online",
"http_referer":"https://fatwombat.online/wp-json/jetpack/v4/sync/spawn-sync?time=1675452113&request_lock_id=1675452113.1056",
"http_user_agent":"WordPress/6.1.1; https://fatwombat.online",
"http_version":"HTTP/1.1",
"http_x_forwarded_for":"103.115.8.95",
"renderer":"php",
"request_completion":"OK",
"request_time":0.036,
"request_type":"GET",
"request_url":"/wp-json/jetpack/v4/sync/spawn-sync?time=1675452113&request_lock_id=1675452113.1056",
"scheme":"http",
"status":200,
"timestamp":1675452113,
"type":"nginx_json",
"user_ip":"103.115.8.95"
},
{
"body_bytes_sent":198,
"cached":"false",
"date":"2023-02-03T17:49:49.405Z",
"http2":"",
"http_host":"fatwombat.online",
"http_referer":"",
"http_user_agent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/94.0.4606.61 Safari/537.36",
"http_version":"HTTP/1.1",
"http_x_forwarded_for":"89.104.101.102",
"renderer":"static",
"request_completion":"OK",
"request_time":0,
"request_type":"GET",
"request_url":"/favicon.ico",
"scheme":"http",
"status":200,
"timestamp":1675446589,
"type":"nginx_json",
"user_ip":"89.104.101.102"
}
],
"scroll_id":"FGluY2x1ZGVfY29udGV4dF91dWlkDnF1ZXJ5VGhlbkZldGNogAgWdGdWQWZTeHBUaGFJTG1fR0E0LVp2dwAAAAABPOLVFnZ6SFlEODV0UUt1bklUWGs0STdjbVEWeVNlaU56eDdRek9WRmhGQjJHZEk2dwAAAAAEdcDJFkhiWDJMaHc0UWdXbXNRME9uQUZLaHcWSUlDQnhTOGtScmlrMFR1OFM3azlFdwAAAAAEV8-iFnRMcHN2OGdMUmR1M0NROWxQeFp6ZGcWTVItdXJuSW1UVXFKZkhLWktIVDdDdwAAAAAEJkfNFn="
}
Responses
200
Success
Disconnect SSH
Terminate all SSH connections for a site.
Caution: This will affect all active SSH connections, including Pressable SSH connections.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{site_id}/disconnect-ssh' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz' \
--header 'Content-Type: application/json'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Responses
200
Success
Latest Performance Report
Get the data corresponding to the latest performance report generated for a given site. Please note that this data is automatically generated by the Lighthouse tool. Click here for more details .
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{id}/reports/performance/latest' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz' \
--header 'Content-Type: application/json'
Getting an empty response means there is no available performance report for the given site and you may need to retry later.
If there is a performance report available, the data
attribute in the response is always expected to have 2 keys: desktop_report
and mobile_report
. each one with its expected values.
Parameters
Response
{
"message": "Success",
"data": {
"desktop_report": {
"created_at": "2023-09-05T23:15:55Z",
"updated_at": "2023-09-05T23:15:55Z",
"final_url": "https://fatwombat.online/",
"thumbnail_location": "https://pressable-performance-reports-staging.s3.amazonaws.com/791/2023-09-05/2023-09-05T23%3A15%3A55.873Z_desktop_tn.jpg",
"performance_score": 0.99,
"performance_title": "Performance",
"accessibility_score": 1.0,
"accessibility_title": "Accessibility",
"best_practices_score": 1.0,
"best_practices_title": "Best Practices",
"seo_score": 1.0,
"seo_title": "SEO",
"first_contentful_paint_title": "First Contentful Paint",
"first_contentful_paint_description": "First Contentful Paint marks the time at which the first text or image is painted.\nLearn more.",
"first_contentful_paint_score": 0.98,
"first_contentful_paint_display_value": "0.7 s",
"first_contentful_paint_numeric_value": "682.552",
"first_contentful_paint_numeric_unit": "millisecond",
"interactive_title": "Time to Interactive",
"interactive_description": "Time to interactive is the amount of time it takes for the page to become fully interactive.\nLearn more.",
"interactive_score": 1.0,
"interactive_display_value": "0.7 s",
"interactive_numeric_value": "745.356",
"interactive_numeric_unit": "millisecond",
"speed_index_title": "Speed Index",
"speed_index_description": "Speed Index shows how quickly the contents of a page are visibly populated. \nLearn more.",
"speed_index_score": 0.99,
"speed_index_display_value": "0.8 s",
"speed_index_numeric_value": "847.931",
"speed_index_numeric_unit": "millisecond",
"total_blocking_time_title": "Total Blocking Time",
"total_blocking_time_description": "Sum of all time periods between FCP and Time to Interactive, when task length exceeded 50ms, expressed in milliseconds.\nLearn more.",
"total_blocking_time_score": 1.0,
"total_blocking_time_display_value": "10 ms",
"total_blocking_time_numeric_value": "13.0",
"total_blocking_time_numeric_unit": "millisecond",
"largest_contentful_paint_title": "Largest Contentful Paint",
"largest_contentful_paint_description": "Largest Contentful Paint marks the time at which the largest text or image is painted.\nLearn more.",
"largest_contentful_paint_score": 0.97,
"largest_contentful_paint_display_value": "0.9 s",
"largest_contentful_paint_numeric_value": "865.874",
"largest_contentful_paint_numeric_unit": "millisecond",
"cumulative_layout_shift_title": "Cumulative Layout Shift",
"cumulative_layout_shift_description": "Cumulative Layout Shift measures the movement of visible elements within the viewport. \nLearn more.",
"cumulative_layout_shift_score": 1.0,
"cumulative_layout_shift_display_value": "0",
"cumulative_layout_shift_numeric_value": "0.0",
"cumulative_layout_shift_numeric_unit": "unitless",
"server_response_time_title": "Initial Server Response Time",
"server_response_time_description": "Keep the server response time for the main document short because all other requests depend on it. \n[Learn more](https://web.dev/time-to-first-byte/).",
"server_response_time_score": 1.0,
"server_response_time_display_value": "Root document took 350 ms",
"server_response_time_numeric_value": "353.493",
"server_response_time_numeric_unit": "millisecond",
"lighthouse_version": "9.6.8",
"fetch_time": "2023-09-05T23:15:58Z"
},
"mobile_report": {
"created_at": "2023-09-05T23:15:55Z",
"updated_at": "2023-09-05T23:15:55Z",
"final_url": "https://fatwombat.online/",
"thumbnail_location": "https://pressable-performance-reports-staging.s3.amazonaws.com/791/2023-09-05/2023-09-05T23%3A15%3A55.873Z_mobile_tn.jpg",
"performance_score": 0.84,
"performance_title": "Performance",
"accessibility_score": 1.0,
"accessibility_title": "Accessibility",
"best_practices_score": 1.0,
"best_practices_title": "Best Practices",
"seo_score": 1.0,
"seo_title": "SEO",
"first_contentful_paint_title": "First Contentful Paint",
"first_contentful_paint_description": "First Contentful Paint marks the time at which the first text or image is painted.\nLearn more.",
"first_contentful_paint_score": 0.77,
"first_contentful_paint_display_value": "2.2 s",
"first_contentful_paint_numeric_value": "2229.358",
"first_contentful_paint_numeric_unit": "millisecond",
"interactive_title": "Time to Interactive",
"interactive_description": "Time to interactive is the amount of time it takes for the page to become fully interactive.\nLearn more.",
"interactive_score": 0.89,
"interactive_display_value": "3.8 s",
"interactive_numeric_value": "3842.291",
"interactive_numeric_unit": "millisecond",
"speed_index_title": "Speed Index",
"speed_index_description": "Speed Index shows how quickly the contents of a page are visibly populated. \nLearn more.",
"speed_index_score": 0.99,
"speed_index_display_value": "2.2 s",
"speed_index_numeric_value": "2229.358",
"speed_index_numeric_unit": "millisecond",
"total_blocking_time_title": "Total Blocking Time",
"total_blocking_time_description": "Sum of all time periods between FCP and Time to Interactive, when task length exceeded 50ms, expressed in milliseconds.\nLearn more.",
"total_blocking_time_score": 0.89,
"total_blocking_time_display_value": "200 ms",
"total_blocking_time_numeric_value": "200.477",
"total_blocking_time_numeric_unit": "millisecond",
"largest_contentful_paint_title": "Largest Contentful Paint",
"largest_contentful_paint_description": "Largest Contentful Paint marks the time at which the largest text or image is painted.\nLearn more.",
"largest_contentful_paint_score": 0.65,
"largest_contentful_paint_display_value": "3.5 s",
"largest_contentful_paint_numeric_value": "3464.678",
"largest_contentful_paint_numeric_unit": "millisecond",
"cumulative_layout_shift_title": "Cumulative Layout Shift",
"cumulative_layout_shift_description": "Cumulative Layout Shift measures the movement of visible elements within the viewport. \nLearn more.",
"cumulative_layout_shift_score": 1.0,
"cumulative_layout_shift_display_value": "0",
"cumulative_layout_shift_numeric_value": "0.0",
"cumulative_layout_shift_numeric_unit": "unitless",
"server_response_time_title": "Initial Server Response Time",
"server_response_time_description": "Keep the server response time for the main document short because all other requests depend on it. \n[Learn more](https://web.dev/time-to-first-byte/).",
"server_response_time_score": 1.0,
"server_response_time_display_value": "Root document took 80 ms",
"server_response_time_numeric_value": "80.431",
"server_response_time_numeric_unit": "millisecond",
"lighthouse_version": "9.6.8",
"fetch_time": "2023-09-05T23:16:15Z"
}
},
"errors": null
}
Responses
200
Success
Themes
Themes are design templates that determine the visual layout and style of a WordPress website, including elements like headers, footers, content display, and overall aesthetics. They can be customized or replaced to achieve a desired look and feel.
With these API endpoints, you can manage themes for your sites.
Theme List
Get a list of themes for the specified site.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/{id}/themes' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh' \
--header 'Content-Type: application/json'
Parameters
Response
{
"message": "Success",
"data": [
{
"name": "astra",
"title": "Astra",
"description": "Astra is fast, fully customizable & beautiful WordPress theme suitable\nfor blog, personal portfolio, business website and WooCommerce storefront.\nIt is very lightweight (less than 50KB on frontend) and offers unparalleled\nspeed. Built with SEO in mind, Astra comes with Schema.org code integrated\nand is Native AMP ready so search engines will love your site. It offers\nspecial features and templates so it works perfectly with all page builders\nlike Elementor, Beaver Builder, Visual Composer, SiteOrigin, Divi, etc.\nSome of the other features: # WooCommerce Ready # Responsive # RTL &\nTranslation Ready # Extendible with premium addons # Regularly updated #\nDesigned, Developed, Maintained & Supported by Brainstorm Force.\nLooking for a perfect base theme? Look no further. Astra is fast, fully\ncustomizable and WooCommerce ready theme that you can use for building any\nkind of website!",
"status": "inactive",
"update": "available",
"version": "4.1.4",
"update_version": "4.1.5"
},
{
"name": "kadence",
"title": "Kadence",
"description": "Kadence Theme is a lightweight yet full featured WordPress theme for\ncreating beautiful fast loading and accessible websites, easier than ever.\nIt features an easy to use drag and drop header and footer builder to build\nany type of header in minutes. It features a full library of gorgeous\nstarter templates that are easy to modify with our intelligent global font\nand color controls. With extensive integration with the most popular 3rd\nparty plugins, you can quickly build impressive ecommerce websites, course\nwebsites, business websites, and more.",
"status": "active",
"update": "available",
"version": "1.1.36",
"update_version": "1.1.39"
}
],
"errors": null
}
Install and Activate Themes
You may want to install a WordPress theme to give your website a professional appearance without needing extensive coding skills. Themes offer ready-made design and functionality, allowing you to easily customize your site's layout, color scheme, typography, and more, ensuring it aligns with your brand or personal style.
This endpoint installs and activates a theme for the specified site. Job Queues are used to install and activate the themes. Please use our Theme related Webhooks to know if the theme was installed and activated successfully.
Themes can be installed from the WordPress theme repository or from a custom URL.
To install a theme from the WordPress theme repository, use the theme name (slug). If a slug is used the WordPress API is used to determine if the theme slug is valid. To install a theme from a custom URL, use the HTTPS URL to the theme zip file.
The theme version is an optional parameter. If not specified, the latest version of the theme will be installed.
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/{id}/themes' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzTBKh' \
--header 'Content-Type: application/json' \
--data '{
"themes": [
{
"path": "astra",
"version": "4.1.4"
},
{
"path": "https://downloads.wordpress.org/theme/kadence.1.1.36.zip"
}
]
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Update Themes
Updating WordPress themes is crucial for maintaining site security, fixing bugs, and ensuring compatibility with the latest WordPress core updates. Theme updates often include new features and improvements in design and performance, enhancing user experience and the overall functionality of the website.
This endpoint updates themes for the specified site. Job Queues are used to update the themes. Please use our Theme related Webhooks to know if the theme was updated successfully.
Themes are updated using the theme name (slug).
The theme version is an optional parameter. If not specified, the theme will be updated to the latest version.
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/{id}/themes' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzTBKh' \
--header 'Content-Type: application/json' \
--data '{
"themes": [
{
"path": "astra",
"version": "4.1.4"
}
]
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Activate Themes
Activating a WordPress theme is important because it applies the selected theme's design and functionality to your website. Until a theme is activated, it won't influence your site's appearance or features. By activating a theme, you ensure your site reflects the aesthetic and functions you've chosen for your brand or content.
This endpoint activates a theme for the specified site. Job Queues are used to activate the theme. Please use our Theme related Webhooks to know if the theme was activated successfully.
A theme is activated using the theme name (slug).
Only one theme can be active at a time.
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/{id}/themes/activate' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzTBKh' \
--header 'Content-Type: application/json' \
--data '{
"themes": [
{
"path": "astra"
}
]
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
Delete Themes
Deleting unused WordPress themes is important for maintaining site security and optimal performance. Unused themes can become outdated, posing a security risk if they aren't regularly updated. Moreover, they can take up valuable storage space, potentially slowing down your website. Therefore, it's best practice to delete themes you're not using.
This endpoint deletes themes for the specified site. Job Queues are used to delete the themes. Please use our Theme related Webhooks to know if the theme was deleted successfully.
Themes are deleted using the theme name (slug).
Request
curl --location --request DELETE 'https://my.pressable.com/v1/sites/{id}/themes' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzTBKh' \
--header 'Content-Type: application/json' \
--data '{
"themes": [
{
"path": "astra"
},
{
"path": "twentytwentythree"
}
]
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
WordPress
Professionals often seek a more efficient way to manage and automate their WordPress sites. We are providing ways to interact with WordPress installations, offering speed and automation capabilities. Our API Endpoints elevate this efficiency by allowing customers to seamlessly integrate WP-CLI commands into their workflows. Whether you are looking to create a WordPress user or execute a myriad of other WP-CLI tasks, our API facilitates these operations directly, enabling a more streamlined site management experience.
Create WordPress User
This endpoint allows you to create a WordPress user directly within your site. The user won't be created in Pressable and its data won't be retained in our systems in any way.
Please note that the email received within the parameters, will be used as both the user-login and user-email of the new WordPress user, as required in WordPress documentation.
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/{id}/wordpress/users' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzTBKh' \
--header 'Content-Type: application/json' \
--data '{
"email": "my_new_user@mydomain.com"
}'
Parameters
Response
{
"message": "Success",
"data": {
"id": "10",
"email": "my_new_user@mydomain.com",
"password": "1bb31b9bfee1e41644c8eec17c2d9bae"
},
"errors": null
}
WP-CLI Commands
This endpoint allows you to run WP-CLI commands via the API. WP-CLI is the command-line interface for WordPress.
Please note that we prefix all commands with our appropriate WP-CLI path, so you do not include it in your request. For instance, if you wish to run the command wp role create employee Employee
, your command array should look like this: [ 'role create employee Employee' ]
To stay informed when your commands are completed, we recommend integrating with our webhooks. Responses from the WP-CLI command are directly relayed back via these webhooks.
Please be aware:
- Do not send sensitive information (passwords, API keys, etc.) via WP-CLI commands, as the messages are not encrypted and are stored in plain text for logging purposes.
- Commands are executed as they are processed, so there is no guaranteed sequence when submitting multiple commands. For sequential execution, either input your commands one by one or run them manually.
- Our system processes commands using job queues. If a command fails, it will not be retried.
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/{id}/wordpress/wpcli' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzTB' \
--header 'Content-Type: application/json' \
--data '{
"commands": [
"role create poster '\''Poster Only'\''",
"role create employee Employee"
]
}'
Parameters
Response
{
"message": "Success",
"data": null,
"errors": null
}
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.
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.
Your webhook log messages are available for 90 days after creation.
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.
Please be aware that we will automatically deactivate endpoints that encounter ngrok/ultrahook-specific errors, such as "Tunnel f3b8-110-39-36-126.ngrok-free.app not found ERR_NGROK_3200". If you are conducting tests, ensure that you deactivate the webhook URL after you finish testing.
Site Created
Sent when a site is created in your account.
Response
{
"event": "site_created",
"site": {
"id": 1,
"state": "live"
}
}
Site Deleted
Sent when a site is deleted in your account.
Response
{
"event": "site_deleted",
"site": {
"id": 1
}
}
Site Converted
Sent when a site is converted from staging to live or vice-versa
Response
{
"event": "site_converted",
"site": {
"id": 1,
"site_converted_to": "staging"
}
}
Site Enabled
Sent when a site is enabled
Response
{
"event": "site_enabled",
"site": {
"id": 1,
"state": "live"
}
}
Site Disabled
Sent when a site is disabled
Response
{
"event": "site_disabled",
"site": {
"id": 1,
"state": "disabled"
}
}
Site Hacked
We want to ensure the security of your website, and for that reason, we have implemented a policy where any site marked as hacked will be temporarily disabled. Please note that only a Customer Support team member can mark the site safe again, which will restore its functionality. Once the necessary steps have been taken to resolve any security issues, a Customer Support team member will mark the site safe again, and it will be fully functional.
Response
{
"event": "site_hacked",
"site": {
"id": 1,
"state": "disabled",
"status": "hacked"
}
}
Site Restored
Sent when a site has been fully restored
Response
{
"event": "site_restored",
"site": {
"id": 1
},
"restore": {
"restored_by": "Tom Doe [tomdoe@pressable.dev]",
"database_id": "3340580943",
"filesystem_id": "3340580943",
"requested_at": "2023-03-14T18:05:36.673Z",
"requested_at_timestamp": 1678817136,
"completed_at": "2023-03-14T21:05:36.000Z",
"completed_at_timestamp": 1678827936
}
}
Site Sync Success
Sent when a site has been synced successfully
Response
{
"event": "sync_success",
"from_site_id": 3,
"to_site_id": 1,
"restore_sync_request": {
"message": "Sync completed successfully",
"status": "completed",
"requested_by": "Tom Doe [tomdoe@pressable.dev]",
}
}
Site Sync Failed
Sent when a site sync has failed
Response
{
"event": "sync_failed",
"from_site_id": 3,
"to_site_id": 1,
"restore_sync_request": {
"message": "Unable to rollback filesystem due to sync failure, restore site filesystem and database manually",
"status": "failed",
"error": "SSH connection failed",
"failed_at": 1690235593,
"requested_by": "Tom Doe [tomdoe@pressable.dev]",
}
}
Site SSH Command
Sent when a site has run an SSH command
Response
{
"event": "ssh_command",
"site_id": 1,
"result": {
"message": "Command [ wp role create employee Employee ] :::: Success: Role with key 'employee' created.\n",
"command": "wp role create employee Employee"
}
}
Site Plugin Installed Successfully
Sent when a Plugin is installed successfully for a site. Version is returned as `latest` if no version was specified.
Response
{
"event": "plugin_installed",
"site": {
"id": 1
},
"plugin": {
"path": "wpforms-lite",
"version": "1.8.0.2"
}
}
Site Plugin Install Failed
Sent when a Plugin fails to install for a site. Version is returned as `latest` if no version was specified.
Response
{
"event": "plugin_install_failed",
"site": {
"id": 1
},
"plugin": {
"path": "wpforms-lite-v23",
"version": "latest"
},
"error": {
"message": "Plugin slug not found in WordPress repository - wpforms-lite-v23"
}
}
Site Plugin Updated Successfully
Sent when a Plugin is successfully updated for a site. Version is returned as `latest` if no version was specified.
Response
{
"event": "plugin_updated",
"site": {
"id": 1
},
"plugin": {
"path": "wpforms-lite",
"version": "latest"
}
}
Site Plugin Update Failed
Sent when a Plugin fails to update for a site. Version is returned as `latest` if no version was specified.
Response
{
"event": "plugin_update_failed",
"site": {
"id": 1
},
"plugin": {
"path": "wpforms-lite",
"version": "1.8.0.2"
},
"error": {
"message": "Could not update plugin - wpforms-lite - Error: Can't find the requested plugin's version in the WordPress.org plugin repository (HTTP code 404)"
}
}
Site Plugin Deactivated Successfully
Sent when a Plugin is successfully deactivated for a site.
Response
{
"event": "plugin_deactivated",
"site": {
"id": 1
},
"plugin": {
"path": "wpforms-lite"
}
}
Site Plugin Deactivation Failed
Sent when a Plugin fails to deactivate for a site.
Response
{
"event": "plugin_deactivation_failed",
"site": {
"id": 1
},
"plugin": {
"path": "wpforms-lite"
},
"error": {
"message": "Could not deactivate plugin - wpforms-lite - Error: No plugins deactivated"
}
}
Site Plugin Activated Successfully
Sent when a Plugin is successfully activated for a site.
Response
{
"event": "plugin_activated",
"site": {
"id": 1
},
"plugin": {
"path": "wpforms-lite"
}
}
Site Plugin Activation Failed
Sent when a Plugin fails to activate for a site.
Response
{
"event": "plugin_activation_failed",
"site": {
"id": 1
},
"plugin": {
"path": "wpforms-lite"
},
"error": {
"message": "Could not activate plugin - wpforms-lite - Error: No plugins activated"
}
}
Site Plugin Deleted Successfully
Sent when a Plugin is successfully deleted for a site.
Response
{
"event": "plugin_deleted",
"site": {
"id": 1
},
"plugin": {
"path": "wpforms-lite"
}
}
Site Plugin Delete Failed
Sent when a Plugin fails to delete for a site.
Response
{
"event": "plugin_delete_failed",
"site": {
"id": 1
},
"plugin": {
"path": "wpforms-lite"
},
"error": {
"message": "Could not delete plugin - wpforms-lite - Error: There has been a critical error on this website"
}
}
Site Theme Installed Successfully
Sent when a Theme is installed successfully for a site. Version is returned as `latest` if no version was specified.
Response
{
"event": "theme_installed",
"site": {
"id": 1
},
"theme": {
"path": "astra",
"version": "3.0.1"
}
}
Site Theme Install Failed
Sent when a Theme fails to install for a site. Version is returned as `latest` if no version was specified.
Response
{
"event": "theme_install_failed",
"site": {
"id": 1
},
"theme": {
"path": "astra-lite-2",
"version": "latest"
},
"error": {
"message": "Theme slug not found in WordPress repository - astra-lite-2"
}
}
Site Theme Updated Successfully
Sent when a Theme is successfully updated for a site. Version is returned as `latest` if no version was specified.
Response
{
"event": "theme_updated",
"site": {
"id": 1
},
"theme": {
"path": "astra",
"version": "latest"
}
}
Site Theme Update Failed
Sent when a Theme fails to update for a site. Version is returned as `latest` if no version was specified.
Response
{
"event": "theme_update_failed",
"site": {
"id": 1
},
"theme": {
"path": "astra",
"version": "4.1.0"
},
"error": {
"message": "Could not update theme - astra - Error: Can't find the requested theme's version in the WordPress.org theme repository (HTTP code 404)"
}
}
Site Theme Activated Successfully
Sent when a Theme is successfully activated for a site.
Response
{
"event": "theme_activated",
"site": {
"id": 1
},
"theme": {
"path": "astra"
}
}
Site Theme Activation Failed
Sent when a Theme fails to activate for a site.
Response
{
"event": "theme_activation_failed",
"site": {
"id": 1
},
"theme": {
"path": "astra"
},
"error": {
"message": "Could not activate theme - astra - Error: No themes activated"
}
}
Site Theme Deleted Successfully
Sent when a Theme is successfully deleted for a site.
Response
{
"event": "theme_deleted",
"site": {
"id": 1
},
"theme": {
"path": "astra"
}
}
Site Theme Delete Failed
Sent when a Theme fails to delete for a site.
Response
{
"event": "theme_delete_failed",
"site": {
"id": 1
},
"theme": {
"path": "astra"
},
"error": {
"message": "Could not delete theme - astra - Error: There has been a critical error on this website"
}
}
Git Deploy Completed
Sent when Git deploy completes successfully
Response
{
"event": "git_deploy_completed",
"site": {
"id": 1
},
"git": {
"before": "9dd0f047",
"after": "13407c6d",
"name": "john",
"email": "user@user.com",
"created_at": "2023-04-11T18:05:38.000Z",
"created_at_timestamp": 1681236338,
"repository": "https://github.com/Pressable/test.git",
"branch": "master",
"state": "deployed",
"message": "null"
}
}
Git Deploy Failed
Sent when Git deploy fails
Response
{
"event": "git_deploy_failed",
"site": {
"id": 1
},
"git": {
"error": {
"message": "Could not execute a Git deploy for my-presssable-net [1] - invalid auth token"
}
}
}
PHP Version Changed
Sent when a site's PHP version is changed
Response
{
"event": "php_version_changed",
"site": {
"id": 1,
"state": "live",
"php_version": 8.0
}
}
WP Environment Type
Sent when a site's WP Environment Type is changed
Response
{
"event": "wp_environment_type_changed",
"site": {
"id": 1,
"state": "live",
"wp_environment_type": "staging"
}
}
WordPress Version Changed
Sent when a site's WordPress Version is changed
Response
{
"event": "wordpress_version_changed",
"site": {
"id": 1,
"state": "live",
"wp_version": "beta",
"wp_version_text": "Latest Release (Beta)"
}
}
WordPress Admin Password Reset
Sent when a WordPress Admin User Password has been reset
Response
{
"event": "wordpress_admin_password_reset",
"site": {
"id": 1
},
"user": {
"email": "user@email.com"
}
}
Light Weight 404 Setting Changed
Sent when a site's Light Weight 404 setting is enabled, or disabled
Response
{
"event": "light_weight_404_changed",
"site": {
"id": 1,
"state": "live",
"light_weight_404_changed": "enabled"
}
}
Collaborator Added
Sent when a collaborator is added to a site
Response
{
"event": "collaborator_added",
"site": {
"id": 1
},
"collaborator": {
"id": 1,
"email": "user@user.com"
}
}
Collaborator Deleted
Sent when a collaborator is deleted from a site
Response
{
"event": "collaborator_deleted",
"site": {
"id": 1
},
"collaborator": {
"id": 1,
"email": "user@user.com"
}
}
SFTP User Password Reset
Sent when an SFTP User password has been reset
Response
{
"event": "sftp_user_password_reset",
"site": {
"id": 1
},
"sftp": {
"username": "john"
}
}
On-Demand Backup Created
Sent when an On-Demand backup is created for a site
Response
{
"event": "ondemand_backup_created",
"backup": {
"id": "50567",
"requestId": 505674,
"type": "fs",
"status": "created",
"created_at": "2023-05-01T16:21:07.603Z",
"created_at_timestamp": 1682958067,
"system_delete_at": "2023-05-31T16:22:05.000Z",
"system_delete_at_timestamp": 1685550125,
"created_by":"John Doe [user@user.com]"
},
"site": {
"id": 1223013
}
}
On-Demand Backup Deleted
Sent when an On-Demand backup is deleted from a site
Response
{
"event": "ondemand_backup_deleted",
"backup": {
"id": "5056740232",
"status": "deleted",
"type": "fs",
"deleted_by": "John Doe [user@user.com]",
"deleted_at": "2023-05-01T16:31:03.000Z",
"deleted_at_timestamp": 1682958663
},
"site": {
"id":1
}
}
Enabled Edge Cache
Sent when Edge Cache is enabled for a site
Response
{
"event": "enabled_edge_cache",
"site": {
"id": 5
},
"user": {
"email": "user@user.com"
}
}
Disabled Edge Cache
Sent when Edge Cache is disabled for a site
Response
{
"event": "disabled_edge_cache",
"site": {
"id": 5
},
"user": {
"email": "user@user.com"
}
}
Purged Edge Cache
Sent when Edge Cache is purged for a site
Response
{
"event": "purged_edge_cache",
"site": {
"id": 5
},
"user": {
"email": "user@user.com"
}
}
Primary Domain Set
Sent when a site's primary domain has been set. When the primary domain is set to the mystagingwebsite.com domain, the record id will be -1.
Response
{
"event": "primary_domain_set",
"site": {
"id": 1
},
"record": {
"url": "www.domain.com",
"id": 12
}
}
Domain Added
Sent when a new domain has been added
Response
{
"event": "domain_added",
"site": {
"id": 1
},
"record": {
"url": "www.domain.com",
"id": 12
}
}
Domain Removed
Sent when a domain has been removed
Response
{
"event": "domain_removed",
"site": {
"id": 1
},
"record": {
"url": "www.domain.com",
"id": 12
}
}
Errors
We use conventional HTTP response codes to indicate the success, or failure, of an API request.
400 Response
{
"message": "There was a problem processing your request.",
"data": null,
"errors": [
"Message"
]
}
400
401 Response
No response body
401
404 Response
{
"message": "We could not locate the requested resources.",
"data": null,
"errors": null
}
404
500 Response
{
"message": "An internal error occurred while processing your request. Please try again.",
"data": null,
"errors": null
}
500
Job Queues
The Pressable API uses job queues to process long running tasks. These jobs are queued and processed in the background. The API will return a 200 response when a job is queued. The completion notification of enqueued jobs can be monitored via our webhooks.
There are various reasons why jobs may fail, ranging from network problems and WordPress errors to issues with the data itself. In the event of a failure, the queued job system is designed to automatically retry the job 10 times. This retrying process adheres to a specific schedule to ensure optimal reprocessing of the failed job:
- 1st reattempt: 6 seconds after the initial attempt
- 2nd reattempt: 20 seconds after the 1st reattempt
- 3rd reattempt: 1 minute after the 2nd reattempt
- 4th reattempt: 5 minutes after the 3rd reattempt
- 5th reattempt: 10 minutes after the 4th reattempt
- 6th reattempt: 20 minutes after the 5th reattempt
- 7th reattempt: 40 minutes after the 6th reattempt
- 8th reattempt: 1 hour after the 7th reattempt
- 9th reattempt: 2 hours after the 8th reattempt
- 10th reattempt: 3 hours after the 9th reattempt