Add project
Adds and updates a new URL
Request
GET or POST https://api.wattspeed.com/v1/add
Headers
Your API token.
Parameters
The URL that you want to add
Allowed values: mobile
, desktop
.
When passing multiple locations, include each location in a different parameter using the same name. Example: location=s_carolina&location=tokyo
.
Allowed values: s_carolina
, los_angeles
, frankfurt
, london
, tokyo
, sao_paulo
.
Allowed values: manual
, daily
, weekly
, monthly
.
Used only for weekly
and monthly
frequencies.
For weekly
, the day index, where 1 is Monday, and 7 is Sunday.
For monthly
, the number of your desired day.
The name of your project
Gather or not the CrUX data.
Allowed values: true
, false
.
Useful if the first request to the url returns a redirect status code.
Allowed values: true
, false
.
Example request
GET
https://api.wattspeed.com/v1/add?name=wattspeed.com.com&url=https://wattspeed.com&device=mobile&locations=london&frequency=daily&get_crux=true&followRedirects=true
POST
{
"name": "wattspeed.com",
"url": "https://wattspeed.com",
"device": "mobile",
"locations": ["london"],
"frequency": "daily",
"get_crux": false,
"followRedirects": false
}
Responses
- 200
- 400
- 401
- 405
- 406
- 415
- 500
{
"addedDomains": [
"https://wattspeed.com"
]
}
The message
and errors
are subject to change and may include more info than listed here.
{
"status": "BAD_REQUEST",
"message": "This webpage already exist",
"errors": [
"This webpage already exist"
]
}
The message
and errors
are subject to change and may include more info than listed here.
{
"status": "UNAUTHORIZED",
"message": "API token not valid. Please enter a valid API token",
"errors": [
"API token not valid. Please enter a valid API token"
]
}
The message
and errors
are subject to change and may include more info than listed here.
{
"status": "METHOD_NOT_ALLOWED",
"message": "Request method 'PUT' not supported",
"errors": [
"PUT method is not supported for this request. Supported methods are GET, POST"
]
}
The message
and errors
are subject to change and may include more info than listed here.
{
"status" : "NOT_ACCEPTABLE",
"message" : "No acceptable representation",
"errors" : [
"Media type is not supported. Supported media type is application/json"
]
}
The message
and errors
are subject to change and may include more info than listed here.
{
"status" : "UNSUPPORTED_MEDIA_TYPE",
"message" : "Content-Type 'application/x-www-form-urlencoded' is not supported",
"errors" : [
"application/x-www-form-urlencoded media type is not supported. Supported media type is application/json"
]
}
The message
and errors
are subject to change and may include more info than listed here.
{
"status": "INTERNAL_SERVER_ERROR",
"message": "Something went wrong, please try again",
"errors": [
"Something went wrong, please try again"
]
}