This page will help you get started with SpeedCurve API v2.

Version 2 of the SpeedCurve REST API includes additional endpoints and follows a more standardized approach to request and response formats, along with other improvements.

The new API is supplementary rather than a complete replacement for the existing API for now. As the API continues to be developed, more endpoints will become available. We haven't set a specific timeframe for the full release yet.

What's new in the API v2

  • Improved support of REST principles, including:
    • Predictable resource-oriented URLs (e.g. GET /v2/accounts/{account_id}/sites)
    • Improved resource consistency across endpoints, including smaller resources, ensuring more efficient response
    • Consistent response format for content responses ( data root element for resource(s) and meta for pagination) and error responses (see details below)
  • Accepts request body and exposes data in JSON encoding
  • All collection endpoints (e.g. GET /v2/accounts/{account_id}/deploys) are paginated (see details below)

API base URI

The base URI for the API v2 is:

https://api.speedcurve.com/v2

Authentication

For authentication and please see API v1.

Response format

Response always has data root element (except DELETE endpoints that might return empty response).

For example, a single resource response (GET /v2/accounts/current):

{
    "data": {
        "account_id": 123,
        "name": "Acme"
    }
}

Pagination

All collection endpoints (e.g. GET /v2/accounts/{account_id}/deploys) are paginated, usually returning 100 items by default. The amount can be increased through the per_page parameter, usually to 1,000 items.

Total number of items and pages available in meta object:

{
  "data": [],
  "meta": {
    "current_page": 1,
    "from": 1,
    "last_page": 16,
    "path": "https://api.speedcurve.com/v2/accounts/123/deploys",
    "per_page": 100,
    "to": 100,
    "total": 1564
  }
}

Errors

Errors are communicated via standard HTTP response codes.

In general:

  • Status codes in the 2xx range indicate success.
  • Code in the 4xx range indicate an error given the information you provided.
  • Codes in the 5xx range indicate an error on our end.

General error response format:

{
  "message": "Monthly synthetic checks quota exceeded."
}

Validation error response format (HTTP status code 422):

{
  "message": "Request parameters are not valid.",
  "errors": {
    "site_id": [
      "The site id field is required."
    ]
  }
}

Rate limits

Please see API v1 rate limits.

Changelog

Please see API v2 changelog.

FAQ

What does "beta" mean?

Beta API indicates that the API is actively under development. We're providing documentation for your reference to understand and test our API.

While you're welcome to use the new API, please note that we do not offer operational support or SLAs for our Beta APIs.

How stable is the new API?

We may introduce new filter parameters and fields to the response objects, but we do not plan to remove any. Therefore, integrations built using this new API should remain stable.

How can I report a bug?

Please provide your feedback and report bugs by sending us an email on [email protected]