Introduction

Boxydev Cloud API allows you to create and manage server and site on Boxydev Cloud via an API.

Authentication

To use the API, you need to create an API token on your account. After, you can authenticate your request with a bearer token :

Authorization: Bearer API_TOKEN_HERE

Headers

Make sure to have the correct headers in all requests like :

Accept: application/json
Content-Type: application/json

You can also include an user agent in header :

User-Agent: Fiorella App

URL

Boxydev Cloud base API URL is :

https://cloud.boxydev.com/api

Example request with authentication :

curl "https://cloud.boxydev.com/api/user" \
    -H "Authorization: Bearer xcUtaweDfsoapbNcIK9D2Isroh7h2MHNn5jfJn1Z" \
    -H "Accept: application/json" \
    -H "Content-Type: application/json"

Pagination

When you are using an API route who return a list, the list is paginated. You can see a data in result to check that.

You can use the query parameter ?page= to choose the page to display. You can also set ?per_page= to choose how much results you want on a page.

Response paginate look like this :

{
    "data": [
        {
            // ...
        }
    ],
    "links": {
        "first": "https://cloud.boxydev.com/api/route?page=1",
        "last": "https://cloud.boxydev.com/api/route?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "path": "https://cloud.boxydev.com/api/route",
        "per_page": 20,
        "to": 1,
        "total": 1
    }
}

Errors

We use the most known HTTP status to let you know what is happening when you use our API.

Error Description
200 Everything is good.
201 Resource has been created successfully.
401 API Key is not valid.
402 Subscription is not valid.
404 Resource could not be found.
422 Missing required parameters or invalid data was given.
429 Too many attempts.
500 An internal error at Boxydev Cloud.
503 Boxydev Cloud is offline for maintenance.

Rate limiting

To protect our API, we rate limit each requests. Every plan subscription has its own limit :

Basic Pro Business
60 requests per minute 60 requests per minute 60 requests per minute

You can check the remaining attempts by checking headers API is giving back to you:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 30

If you reach the rate limit, you will get the following response (with 503 status code) :

{
    "message": "Too Many Attempts."
}

In that case, you have to wait 1 minute. You can check in header how much seconds left before you can make an other request :

Retry-After: 34
X-Ratelimit-Reset: 1674312609