Introduction
The Pressable API is a REST based API. We accept form-encoded request bodies and return JSON encoded responses. Our API is used by our customers for building custom user interfaces and automating day-to-day operations.
All of our examples are shown using curl. We recommend using Postman for testing your API interactions.
Authentication
OAuth authentication using a provided client id and client secret, which are supplied in the control panel.
Obtain Access Token
Request
curl --location --request POST 'https://my.pressable.com/auth/token' \
--form 'grant_type="client_credentials"' \
--form 'client_id="QbWIe7vxfNzZ1vZ7_YFIDNm_NCD7b5X43A68QX4qfzk"' \
--form 'client_secret="V8uqwz5sL0PdNVm8MUNo5WfdGdm_s1g4BMYSVF47H4k"'
Authentication provides an access token in the response that is required for making requests to the API. Access tokens are active for 1-hour, 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>"
POST Data
Response
{
"access_token": "ib3Y0nfqfi9pzWDlpcHmr-j4U3NPdiMFoCmtalKjVyg",
"token_type": "Bearer",
"expires_in": 3599,
"scope": "authorized",
"created_at": 1645029287,
"id": 2,
"name": "John Doe",
"email": "johndoe@pressable.dev",
"gravatar": "https://www.gravatar.com/avatar/80bc49eb0d067d6a185990b1a97f6452?d=mp",
"scopes": [
"authorized",
"admin",
"owner"
]
}
Revoke Access Token
Request
curl --location --request POST 'https://my.pressable.com/auth/revoke' \
--form 'token="F-piwSMTor9L1nvM1mtf_j8uVI9KmLL-1qHh7WXREq4"' \
--form 'client_id="QbWIe7vxfNzZ1vZ7_YFIDNm_NCD7b5X43A68QX4qfzk"' \
--form 'client_secret="V8uqwz5sL0PdNVm8MUNo5WfdGdm_s1g4BMYSVF47H4k"' \
Revoke an access token to stop the access token from being able to make API requests.
POST Data
Response
No response body
Account
Get current account profile information and settings.
Request
curl --location --request GET 'https://my.pressable.com/v1/account' \
--header 'Authorization: Bearer cjh02WI6u4j4QpKZeKFCAGF9uLINWTXlj9y8DnJskv4'
Parameters
Response
{
"message": "Success",
"data": {
"affiliate": false,
"collaboratorCount": 0,
"email": "johndoe@pressable.dev",
"gravatar": "https://www.gravatar.com/avatar/80bc49eb0d067d6a185990b1a97f6452?d=mp",
"maxSites": 10,
"name": "John Doe",
"organization": "Personal",
"pageViews": {
"allTime": {
"people": 0,
"views": 0
},
"currentMonth": {
"people": 0,
"views": 0
},
"lastMonth": {
"people": 0,
"views": 0
},
"today": {
"people": 0,
"views": 0
},
"twoMonthsAgo": {
"people": 0,
"views": 0
},
"yesterday": {
"people": 0,
"views": 0
}
},
"phoneNumber": "5551111510",
"preview": false,
"productName": "Pro",
"sitesCount": 1308,
"defaultPhpVersion": "8.0",
"recent_activity": [
{
"created": "2022-01-31T20:05:29.000Z",
"createdBy": {
"id": 2,
"created": "2022-01-31T20:05:29.000Z",
"email": "johndoe@pressable.dev",
"name": "John Doe",
"phoneNumber": "5551111510",
"organization": null,
"gravatar": "https://www.gravatar.com/avatar/80bc49eb0d067d6a185990b1a97f6452?d=mp"
},
"type": "Account",
"message": "Test Event 10"
},
{
"created": "2022-01-31T20:05:29.000Z",
"createdBy": {
"id": 2,
"created": "2022-01-31T20:05:29.000Z",
"email": "johndoe@pressable.dev",
"name": "John Doe",
"phoneNumber": "5551111510",
"organization": null,
"gravatar": "https://www.gravatar.com/avatar/80bc49eb0d067d6a185990b1a97f6452?d=mp"
},
"type": "Account",
"message": "Test Event 9"
}
]
},
"errors": null
}
Responses
200
Success
Set Account PHP Version
Set a default PHP version for all new sites created in your account.
Valid PHP Versions:8.0, 8.1 or 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.0"
}'
Parameters
Response
{
"message": "string",
"data": {
"affiliate": true,
"collaboratorCount": 0,
"email": "string",
"gravatar": "string",
"maxSites": 0,
"name": "string",
"organization": "string",
"pageViews": {
"allTime": {
"people": 0,
"views": 0
},
"currentMonth": {
"people": 0,
"views": 0
},
"lastMonth": {
"people": 0,
"views": 0
},
"today": {
"people": 0,
"views": 0
},
"twoMonthsAgo": {
"people": 0,
"views": 0
},
"yesterday": {
"people": 0,
"views": 0
}
},
"phoneNumber": "string",
"preview": true,
"productName": "string",
"sitesCount": 0,
"recentActivity": [
{
"created": "string",
"createdBy": {
"id": 0,
"created": "string",
"email": "string",
"name": "string",
"phoneNumber": "string",
"organization": "string",
"gravatar": "string"
},
"type": "string",
"message": "string"
}
],
"defaultPhpVersion": "string"
},
"errors": [
"string"
]
}
Responses
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": 2,
"created": "2022-01-31T20:05:39.000Z",
"updated": "2022-01-31T20:05:39.000Z",
"accountId": 4,
"email": "tomdoe@pressable.dev",
"siteId": 1,
"state": "active",
"wpUsername": "tom",
"name": "Tom Doe",
"siteName": "my-presssable-net"
},
{
"id": 757,
"created": "2022-01-31T20:05:39.000Z",
"updated": "2022-01-31T20:05:39.000Z",
"accountId": 5,
"email": "clairedoe@pressable.dev",
"siteId": 14,
"state": "active",
"wpUsername": "johndoe",
"name": "Claire Doe",
"siteName": "jittery-crib-4894d78ee4"
},
],
"errors": null
}
Responses
200
Success
Get Collaborator
Get collaborator information for the specified collaborator.
Request
curl --location --request GET 'https://my.pressable.com/v1/collaborators/757' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw'
Parameters
{
"message": "string",
"data": {
"id": 757,
"created": "2022-01-31T20:05:39.000Z",
"updated": "2022-01-31T20:05:39.000Z",
"accountId": 5,
"email": "clairedoe@pressable.dev",
"siteId": 14,
"state": "active",
"wpUsername": "johndoe",
"name": "Claire Doe",
"siteName": "jittery-crib-4894d78ee4"
},
"errors": [
"string"
]
}
Responses
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
- 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/1/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": null,
"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/1/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": null,
"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/1/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": null,
"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/clairedoe%40pressable.dev/sites' \
--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": null,
"tags": []
},
{
"id": 4,
"created": "2022-01-31T20:05:30.000Z",
"accountId": 2,
"clonedFromId": null,
"collaboratorsCount": 1,
"displayName": "four",
"domainsCount": 0,
"ecommerce": false,
"favorite": false,
"ipAddresses": [
"199.16.172.123",
"199.16.173.175"
],
"name": "four",
"state": "live",
"url": "four.mystagingwebsite.com",
"staging": true,
"sftpDomain": "sftp.pressable.com",
"phpVersion": null,
"tags": []
},
]
},
"page": {
"currentPage": 1,
"nextPage": 2,
"lastPage": 65,
"perPage": 20,
"totalItems": 1297
},
"errors": null
}
Responses
200
Success
Get Site using Email Address
Get a site attached to a collaborator.
Request
curl --location --request GET 'https://my.pressable.com/v1/collaborators/clairedoe%40pressable.dev/sites/1' \
--header 'Authorization: Bearer BxrdfyKaV4JKR8zVbVHHl1iqdWoVn-L9oUE2Fl9oMtw'
Parameters
Response
{
"message": "Success",
"data": {
"name": "Claire Doe",
"email": "clairedoe@pressable.dev",
"sites": [
{
"id": 1,
"created": "2022-01-31T20:05:30.000Z",
"accountId": 2,
"clonedFromId": null,
"collaboratorsCount": 3,
"displayName": "pressable.com",
"domainsCount": 1,
"ecommerce": false,
"favorite": false,
"ipAddresses": [
"199.16.172.38",
"199.16.173.236"
],
"name": "my-presssable-net",
"state": "live",
"url": "pressable.com",
"staging": false,
"sftpDomain": "sftp.pressable.com",
"phpVersion": null,
"tags": []
}
]
},
"errors": null
}
Responses
200
Success
Add Site as Favorite
Add a site to collaborator site favorites. Favorite sites show up first in collaborator site listings.
Request
curl --location --request POST 'https://my.pressable.com/v1/collaborators/clairedoe%40pressable.dev/sites/1/favorite' \
--header 'Authorization: Bearer 9m11x6zrCUe7SKMME2dKjF4DrUGHTS8CC6rk-z1_P_M'
Parameters
Response
{
"message": "Success",
"data": {
"name": "Claire Doe",
"email": "clairedoe@pressable.dev",
"sites": [
{
"id": 1,
"created": "2022-01-31T20:05:30.000Z",
"accountId": 2,
"clonedFromId": null,
"collaboratorsCount": 3,
"displayName": "pressable.com",
"domainsCount": 1,
"ecommerce": false,
"favorite": true,
"ipAddresses": [
"199.16.172.38",
"199.16.173.236"
],
"name": "my-presssable-net",
"state": "live",
"url": "pressable.com",
"staging": false,
"sftpDomain": "sftp.pressable.com",
"phpVersion": null,
"tags": []
}
]
},
"errors": null
}
Responses
200
Success
Remove Site as Favorite
Remove a site from a collaborators list of site favorites.
Request
curl --location --request DELETE 'https://my.pressable.com/v1/collaborators/clairedoe%40pressable.dev/sites/1/favorite' \
--header 'Authorization: Bearer 9m11x6zrCUe7SKMME2dKjF4DrUGHTS8CC6rk-z1_P_M'
Parameters
Response
{
"message": "Success",
"data": {
"name": "Claire Doe",
"email": "clairedoe@pressable.dev",
"sites": [
{
"id": 1,
"created": "2022-01-31T20:05:30.000Z",
"accountId": 2,
"clonedFromId": null,
"collaboratorsCount": 3,
"displayName": "pressable.com",
"domainsCount": 1,
"ecommerce": false,
"favorite": false,
"ipAddresses": [
"199.16.172.38",
"199.16.173.236"
],
"name": "my-presssable-net",
"state": "live",
"url": "pressable.com",
"staging": false,
"sftpDomain": "sftp.pressable.com",
"phpVersion": null,
"tags": []
}
]
},
"errors": null
}
Responses
200
Success
Add Site Tag using Email Address
Add tags to a collaborator’s site using the collaborator's email address.
Tag Names (array)(required)
- Tags allow you to add context to your sites for a collaborator and can be used to define what the site is related to.
Request
curl --location --request POST 'https://my.pressable.com/v1/collaborators/clairedoe%40pressable.dev/sites/1/tag' \
--header 'Authorization: Bearer 9m11x6zrCUe7SKMME2dKjF4DrUGHTS8CC6rk-z1_P_M' \
--header 'Content-Type: application/json' \
--data-raw '{
"tag_names": [
"paper", "plastic"
]
}'
Parameters
Response
{
"message": "Success",
"data": {
"name": "Claire Doe",
"email": "clairedoe@pressable.dev",
"sites": [
{
"id": 1,
"created": "2022-01-31T20:05:30.000Z",
"accountId": 2,
"clonedFromId": null,
"collaboratorsCount": 3,
"displayName": "pressable.com",
"domainsCount": 1,
"ecommerce": false,
"favorite": false,
"ipAddresses": [
"199.16.172.38",
"199.16.173.236"
],
"name": "my-presssable-net",
"state": "live",
"url": "pressable.com",
"staging": false,
"sftpDomain": "sftp.pressable.com",
"phpVersion": null,
"tags": [
{
"id": 2603,
"name": "paper"
},
{
"id": 2604,
"name": "plastic"
}
]
}
]
},
"errors": null
}
Responses
200
Success
Remove Site Tag using Email Address
Remove tags from collaborator’s site using collaborator's email address.
Tag IDs (array)(required)
Request
curl --location --request DELETE 'https://my.pressable.com/v1/collaborators/clairedoe%40pressable.dev/sites/1/tag' \
--header 'Authorization: Bearer 9m11x6zrCUe7SKMME2dKjF4DrUGHTS8CC6rk-z1_P_M' \
--header 'Content-Type: application/json' \
--data-raw '{
"tag_ids": [
2603, 2604
]
}'
Parameters
{
"message": "Success",
"data": {
"name": "Claire Doe",
"email": "clairedoe@pressable.dev",
"sites": [
{
"id": 1,
"created": "2022-01-31T20:05:30.000Z",
"accountId": 2,
"clonedFromId": null,
"collaboratorsCount": 3,
"displayName": "pressable.com",
"domainsCount": 1,
"ecommerce": false,
"favorite": false,
"ipAddresses": [
"199.16.172.38",
"199.16.173.236"
],
"name": "my-presssable-net",
"state": "live",
"url": "pressable.com",
"staging": false,
"sftpDomain": "sftp.pressable.com",
"phpVersion": null,
"tags": []
}
]
},
"errors": null
}
Responses
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/6/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/6/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/6/records/38' \
--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/3/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/3/records/1/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
Sites
Site List
Get a list of sites belonging to your account. Sites can be filtered by tag name. Site listing is a full list of sites attached to your account, unless pagination is requested.
Request a paginated response by sending "paginate" set to true in the query parameters. Additional accepted parameters include "per_page" and "page".
- per_page: the amount of sites returned in a response
- page: the page of the response
When paginating, additional information will be placed in the response regarding paging information:
Request
curl --location --request GET 'https://my.pressable.com/v1/sites' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh' \
--header 'Content-Type: application/json' \
--data-raw '{
"paginate": true
}'
Parameters
Response
{
"message": "Success",
"data": [
{
"id": 1,
"created": "2022-01-31T20:05:30.000Z",
"accountId": 2,
"clonedFromId": null,
"collaboratorsCount": 3,
"datacenterCode": "DFW",
"datacenterName": "Dallas, TX, USA",
"displayName": "pressable.com",
"domainsCount": 1,
"ecommerce": false,
"favorite": false,
"ipAddress": "199.16.172.38",
"ipAddressOne": "199.16.172.38",
"ipAddressTwo": "199.16.173.236",
"name": "my-presssable-net",
"state": "live",
"url": "pressable.com",
"staging": false,
"sftpDomain": "sftp.pressable.com",
"phpVersion": null,
"tags": [
{
"id": 1357,
"name": "Halo 3: ODST"
}
],
"wpEnvironmentType":"production"
},
{
"id": 3,
"created": "2022-01-31T20:05:30.000Z",
"accountId": 2,
"clonedFromId": null,
"collaboratorsCount": 0,
"datacenterCode": "DCA",
"datacenterName": "Washington, DC, USA",
"displayName": "zippykidnetworks-net",
"domainsCount": 0,
"ecommerce": false,
"favorite": false,
"ipAddress": "199.16.172.107",
"ipAddressOne": "199.16.172.107",
"ipAddressTwo": "199.16.173.153",
"name": "zippykidnetworks-net",
"state": "deploying",
"url": "zippykidnetworks-net.mystagingwebsite.com",
"staging": false,
"sftpDomain": "sftp.pressable.com",
"phpVersion": null,
"tags": [],
"wpEnvironmentType":"production"
},
{
"id": 4,
"created": "2022-01-31T20:05:30.000Z",
"accountId": 2,
"clonedFromId": null,
"collaboratorsCount": 1,
"datacenterCode": "N/A",
"datacenterName": "N/A",
"displayName": "four",
"domainsCount": 0,
"ecommerce": false,
"favorite": false,
"ipAddress": "199.16.172.123",
"ipAddressOne": "199.16.172.123",
"ipAddressTwo": "199.16.173.175",
"name": "four",
"state": "live",
"url": "four.mystagingwebsite.com",
"staging": true,
"sftpDomain": "sftp.pressable.com",
"phpVersion": null,
"tags": [
{
"id": 744,
"name": "Super Mario Bros. 3"
}
],
"wpEnvironmentType":"staging"
},
],
"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: 8.0, 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,
"favorite": false,
"ipAddress": "199.16.172.70",
"ipAddressOne": "199.16.172.70",
"ipAddressTwo": "199.16.173.246",
"name": "your-site-name",
"state": "deploying",
"url": "your-site-name.mystagingwebsite.com",
"staging": true,
"sftpDomain": "sftp.pressable.com",
"phpVersion": 8.0,
"tags": [],
"wpEnvironmentType": "production"
},
"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/1' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh'
Parameters
Request
{
"message": "Success",
"data": {
"id": 1,
"created": "2022-01-31T20:05:30.000Z",
"accountId": 2,
"clonedFromId": null,
"datacenterCode": "DFW",
"datacenterName": "Dallas, TX, USA",
"displayName": "pressable.com",
"ecommerce": false,
"favorite": false,
"ipAddress": "199.16.172.38",
"ipAddressOne": "199.16.172.38",
"ipAddressTwo": "199.16.173.236",
"name": "my-presssable-net",
"pageViews": {
"allTime": {
"people": 0,
"views": 0
},
"currentMonth": {
"people": 0,
"views": 0
},
"lastMonth": {
"views": 0,
"people": 0
},
"today": {
"people": 0,
"views": 0
},
"twoMonthsAgo": {
"views": 0,
"people": 0
},
"yesterday": {
"people": 0,
"views": 0
}
},
"phpVersion": null,
"sftpDomain": "sftp.pressable.com",
"state": "live",
"url": "pressable.com",
"wordpressLoginUrl": "pressable.com/wp-admin",
"staging": false,
"tags": [
{
"id": 1357,
"name": "Halo 3: ODST"
}
],
"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": {
"message": "Success",
"state": "active"
}
},
"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 process as soon as possible.
- Valid WP Environment Types: local, development, staging or production
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/500' \
--header 'Authorization: Bearer cjh02WI6u4j4QpKZeKFCAGF9uLINWTXlj9y8Dn' \
--header 'Content-Type: application/json' \
--data-raw '{
"name": "Five Hundred Site",
"php_version": "8.0",
"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,
"favorite": false,
"ipAddress": "79.127.25.163",
"ipAddressOne": "79.127.25.163",
"ipAddressTwo": "235.255.236.118",
"name": "busy-nose-1d7f431a88",
"state": "live",
"url": "busy-nose-1d7f431a88.mystagingwebsite.com",
"staging": false,
"sftpDomain": "sftp.pressable.com",
"phpVersion": "8.0",
"tags": [
{
"id": 354,
"name": "Clannad"
}
],
"wpEnvironmentType": "development"
},
"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/555' \
--header 'Authorization: Bearer cjh02WI6u4j4QpKZeKFCAGF9uLINWTXlj9y8Dn'
Parameters
Response
{
"message": "Success",
"data": null,
"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.0",
"8.1"
],
"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 410 Gone response. The disabled site will still count towards your site billing count.
This endpoint only works for API Applications with account owner permission.
More information:https://pressable.com/knowledgebase/disabling-a-site
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/500/disable' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh3434'
Parameters
Response
{
"message": "Success",
"data": {
"id": 500,
"created": "2022-01-31T20:05:33.000Z",
"accountId": 2,
"clonedFromId": null,
"collaboratorsCount": 1,
"datacenterCode": "N/A",
"datacenterName": "N/A",
"displayName": "five hundred site",
"domainsCount": 0,
"ecommerce": false,
"favorite": false,
"ipAddress": "79.127.25.163",
"ipAddressOne": "79.127.25.163",
"ipAddressTwo": "235.255.236.118",
"name": "busy-nose-1d7f431a88",
"state": "disabled",
"url": "busy-nose-1d7f431a88.mystagingwebsite.com",
"staging": false,
"sftpDomain": "sftp.pressable.com",
"phpVersion": "8.0",
"tags": [
{
"id": 354,
"name": "Clannad"
}
]
},
"errors": null
}
Responses
200
Success
Enable Site
This only works for sites that are currently disabled. Enabling a site returns the site to a live state allowing for normal html responses, removing the 410 Gone response for users.
This endpoint only works for API Applications with account owner permission.
More information:https://pressable.com/knowledgebase/disabling-a-site
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/500/enable' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh34'
Parameters
Response
{
"message": "Success",
"data": {
"id": 500,
"created": "2022-01-31T20:05:33.000Z",
"accountId": 2,
"clonedFromId": null,
"collaboratorsCount": 1,
"datacenterCode": "N/A",
"datacenterName": "N/A",
"displayName": "five hundred site",
"domainsCount": 0,
"ecommerce": false,
"favorite": false,
"ipAddress": "79.127.25.163",
"ipAddressOne": "79.127.25.163",
"ipAddressTwo": "235.255.236.118",
"name": "busy-nose-1d7f431a88",
"state": "live",
"url": "busy-nose-1d7f431a88.mystagingwebsite.com",
"staging": false,
"sftpDomain": "sftp.pressable.com",
"phpVersion": "8.0",
"tags": [
{
"id": 354,
"name": "Clannad"
}
]
},
"errors": null
}
Responses
200
Success
Convert Site (Staging/Live)
Staging to Live
Converting a staging site to a live site will add the site to your billable sites, also giving you the ability to add domains to the site.
Live to Staging
Before converting a live site to a staging site verify you have removed all attached DNS records. Converting to a staging site will remove your ability to add DNS records to the site, as well as, remove the site from your billable sites.
This endpoint only works for API Applications with account owner permission.
More information:https://pressable.com/knowledgebase/how-sites-staging-websites-and-website-clones-work-at-pressable/#converting-sites
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/500/convert' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh34'
Parameters
Response
{
"message": "Success",
"data": {
"id": 500,
"created": "2022-01-31T20:05:33.000Z",
"accountId": 2,
"clonedFromId": null,
"datacenterCode": "N/A",
"datacenterName": "N/A",
"displayName": "five hundred site",
"ecommerce": false,
"favorite": false,
"ipAddress": "79.127.25.163",
"ipAddressOne": "79.127.25.163",
"ipAddressTwo": "235.255.236.118",
"name": "busy-nose-1d7f431a88",
"pageViews": {
"allTime": {
"people": 0,
"views": 0
},
"currentMonth": {
"people": 0,
"views": 0
},
"lastMonth": {
"views": 0,
"people": 0
},
"today": {
"people": 0,
"views": 0
},
"twoMonthsAgo": {
"views": 0,
"people": 0
},
"yesterday": {
"people": 0,
"views": 0
}
},
"phpVersion": "7.4",
"sftpDomain": "sftp.pressable.com",
"state": "live",
"url": "busy-nose-1d7f431a88.mystagingwebsite.com",
"wordpressLoginUrl": "busy-nose-1d7f431a88.mystagingwebsite.com/wp-admin",
"staging": true,
"tags": [
{
"id": 354,
"name": "Clannad"
}
],
"collaborators": [
{
"id": 484,
"created": "2022-01-31T20:05:39.000Z",
"email": "clairedoe@pressable.dev",
"gravatar": "https://www.gravatar.com/avatar/595f525cba4a637978bc1ab2899f1d52?d=mp",
"name": "Claire Doe",
"wpUsername": "johndoe",
"username": null
}
],
"jetpack": null
},
"errors": null
}
Responses
200
Success
Clear CDN Cache
Clear the CDN cache for a site with the specified id.
Request
curl --location --request DELETE 'https://my.pressable.com/v1/sites/1/cache' \
--header 'Authorization: Bearer zftCxjDbICWZE2_ToF8eCIXo3sHgcKSzT8BKh34347g'
Parameters
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/1/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/500/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/500/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/500/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/500/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/500/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/500/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/500/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/500/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,
"favorite": false,
"ipAddress": "199.16.172.247",
"ipAddressOne": "199.16.172.247",
"ipAddressTwo": "199.16.173.144",
"name": "five-hundred-clone",
"state": "cloning",
"url": "five-hundred-clone.mystagingwebsite.com",
"staging": true,
"sftpDomain": "sftp.pressable.com",
"phpVersion": null,
"tags": []
},
"errors": null
}
Responses
200
Success
Backups List
Get a list of available site backups for the specified site.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/1/backups' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz'
Parameters
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
Get Site Backup
Download a specified site backup
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/1/backups' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz'
Parameters
Response
{
"message": "string",
"errors": [
"string"
]
}
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/1/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
Collaborator List
Get a list of collaborators for the specified site.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/1/collaborators' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzv'
Parameters
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/1/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"
},
"errors": null
}
Responses
200
Created
Get Site Collaborator
Get site collaborator information.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/1/collaborators/1303' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzv'
Parameters
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/1/collaborators/1303?delete_wp_user=true' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
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/1/collaborators/2/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/1/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/1/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/1/domains/35' \
--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/1/domains/35' \
--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/1/domains/15/primary' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
Parameters
Response
{
"message": "Success",
"data": {
"id": 15,
"created": "string",
"primary": true,
"name": "string",
"healthy": true,
"dnsConfirmed": true,
"provisioned": true,
"domainName": "string",
"ipAddresses": [
"string"
]
}
],
"errors": [
"string"
]
}
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/1/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/1/ftp/my-presssable-net' \
--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/1/ftp/password/my-presssable-net' \
--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/1/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/1/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/1/statistics' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz'
Parameters
Response
{
"message": "Success",
"data": {
"id": 1,
"databaseUsageBytes": 0,
"fileSystemUsageBytes": 0,
"pageViews": {
"today": {
"people": 0,
"views": 0
},
"yesterday": {
"people": 0,
"views": 0
},
"currentMonth": {
"people": 0,
"views": 0
},
"lastMonth": {
"views": 0,
"people": 0
},
"twoMonthsAgo": {
"views": 0,
"people": 0
}
}
},
"errors": null
}
Responses
200
Success
Add Tags
Add tags to your site. Tags allow you to add context to your sites and you can use them to define what your sites are related to.
Tags added to your site are not added to your collaborators tags, inorder to add a tag for a collaborator to see you must add it through the collaborator site tag endpoints.
Tag Names(array) (required)
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/1/tags' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvz' \
--header 'Content-Type: application/json' \
--data-raw '{
"tag_names": [
"paper", "plastic"
]
}'
Parameters
Response
{
"message": "Success",
"data": {
"id": 1,
"created": "2022-01-31T20:05:30.000Z",
"accountId": 2,
"clonedFromId": null,
"collaboratorsCount": 3,
"datacenterCode": "DFW",
"datacenterName": "Dallas, TX, USA",
"displayName": "pressable.com",
"domainsCount": 2,
"ecommerce": false,
"favorite": false,
"ipAddress": "199.16.172.38",
"ipAddressOne": "199.16.172.38",
"ipAddressTwo": "199.16.173.236",
"name": "my-presssable-net",
"state": "live",
"url": "pressable.com",
"staging": false,
"sftpDomain": "sftp.pressable.com",
"phpVersion": null,
"tags": [
{
"id": 1357,
"name": "Halo 3: ODST"
},
{
"id": 2605,
"name": "paper"
},
{
"id": 2606,
"name": "plastic"
}
]
},
"errors": null
}
Responses
200
Created
Remove Tags
Remove tags from your site.
Tags removed from your site are not removed from your collaborators tags, inorder to remove a tag for a collaborator you must remove it through the collaborator site tag endpoints.
Tag Ids(array) (required)
Request
curl --location --request DELETE 'https://my.pressable.com/v1/sites/1/tags' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf' \
--header 'Content-Type: application/json' \
--data-raw '{
"tag_ids": [
2605,2606
]
}'
Parameters
Response
{
"message": "Success",
"data": {
"id": 1,
"created": "2022-01-31T20:05:30.000Z",
"accountId": 2,
"clonedFromId": null,
"collaboratorsCount": 3,
"datacenterCode": "DFW",
"datacenterName": "Dallas, TX, USA",
"displayName": "pressable.com",
"domainsCount": 2,
"ecommerce": false,
"favorite": false,
"ipAddress": "199.16.172.38",
"ipAddressOne": "199.16.172.38",
"ipAddressTwo": "199.16.173.236",
"name": "my-presssable-net",
"state": "live",
"url": "pressable.com",
"staging": false,
"sftpDomain": "sftp.pressable.com",
"phpVersion": null,
"tags": [
{
"id": 1357,
"name": "Halo 3: ODST"
}
]
},
"errors": null
}
Responses
200
Success
Note List
Get the notes attached to the requested site.
Additional accepted parameters include “per_page” and "page".
- per_page: the amount of notes returned in a response
- page: the page of the response
When paginating additional information will be placed in the response regarding paging information:
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/1/notes' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf'
Parameters
Response
{
"message": "Success",
"data": null,
"page": {
"currentPage": 1,
"nextPage": null,
"lastPage": 1,
"perPage": 20,
"totalItems": 0
},
"errors": null
}
Responses
200
Success
Add Note
Add notes to your site.
Request
curl --location --request POST 'https://my.pressable.com/v1/sites/1/notes' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf' \
--header 'Content-Type: application/json' \
--data-raw '{
"subject": "A note created by the Pressable API",
"body": "This is the main content of the note."
}'
Parameters
Response
{
"message": "Success",
"data": {
"id": 8,
"author": "johndoe@pressable.dev",
"subject": "A note created by the Pressable API",
"body": "This is the main content of the note.",
"created": "2022-02-18T17:34:45.000Z",
"updated": "2022-02-18T17:34:45.000Z"
},
"errors": null
}
Responses
200
Created
Get Note
Get specified note for site.
Request
curl --location --request GET 'https://my.pressable.com/v1/sites/1/notes/8' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf'
Parameters
Response
{
"message": "Success",
"data": {
"id": 8,
"author": "johndoe@pressable.dev",
"subject": "A note created by the Pressable API",
"body": "This is the main content of the note.",
"created": "2022-02-18T17:34:45.000Z",
"updated": "2022-02-18T17:34:45.000Z"
},
"errors": null
}
Responses
200
Success
Update Note
Update note for your site.
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/1/notes/8' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf' \
--header 'Content-Type: application/json' \
--data-raw '{
"subject": "Updated note by the Pressable API",
"body": "This is the updated content of the note."
}'
Parameters
Response
{
"message": "Success",
"data": {
"id": 8,
"author": "johndoe@pressable.dev",
"subject": "Updated note by the Pressable API",
"body": "This is the updated content of the note.",
"created": "2022-02-18T17:34:45.000Z",
"updated": "2022-02-18T17:38:01.000Z"
},
"errors": null
}
Responses
200
Updated
Delete Note
Delete a note from your site.
Request
curl --location --request DELETE 'https://my.pressable.com/v1/sites/1/notes/8' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImzvzf'
Parameters
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/1/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/1/wordpress/phpmyadmin' \
--header 'Authorization: Bearer coCy_QWq332qxjHvoU-AwiGWDEGm8ThxdImz'
Parameters
Response
{
"message": "Success",
"data": "https://pressable.com/_pma_login?timestamp=1646159015&nonce=202733835103&token=c47c...6b938",
"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
previous - Previous Version (6.1)
latest - Current Stable Release (6.2)
beta - Latest Release (Beta)
Request
curl --location --request PUT 'https://my.pressable.com/v1/sites/1/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.0,
"wordpressVersion": "Current Stable Release (6.0)",
"tags": []
},
"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/1/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/1/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. The filtering initially used in a request is stored in the scroll_id
returned in the response, so any filters sent along with a scroll id are ignored and only the scroll_id is used for 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/1/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. The filtering initially used in a request is stored in the scroll_id
returned in the response, so any filters sent along with a scroll id are ignored and only the scroll_id is used for 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
Webhooks
Webhooks offer a way to find out when certain events occur within the My Pressable Control Panel. Adding a webhook URL allows you to subscribe to events and we will POST data to the URL you provide.
Currently, the only events being sent via webhooks are site created events.
Webhooks are asynchronous events, but please DO NOT rely on webhooks for events that are time sensitive.
You should accept a webhook request by returning an HTTP "200 OK" response as quickly as possible from your endpoint. We attempt to send each webhook event 10 times before giving up.
Webhook URLs must use HTTPS protocol
Webhook Verification
Using your Account Shared Key and a HMAC SHA 256 signature that is calculated and sent with the Webhook, you can verify the contents of a Webhook as being from Pressable and un-tampered.
Example code for verifying webhooks written for Node.js and PHP.
Webhook Testing
Try using ngrok , or UltraHook , to create webhook test HTTPS URLs, allowing you to inspect the webhook body and headers from localhost.
Response
{
"event": "site_created",
"site": {
"id": 1,
"state": "live"
}
}
Errors
400 Response
{
"message": "There was a problem processing your request.",
"data": null,
"errors": [
"Message"
]
}
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