API reference

Getting started with the API

Create and manage Pixel assets programmatically using the official API


The Pixel API is based on REST. It has predictable resource-oriented URLs, accepts form-encoded request bodies, returns responses as JSON, and uses standard HTTP response codes and authentication.


Our API supports Token Authentication as defined in RFC6750. Within every API request you make, you will need to include your access token.

Once your developer account is approved, visit the API page to generate access tokens. After generating a token you will pass it in the Authorization request header using the Bearer authentication scheme:

Authorization: Bearer <Your Access Token>

Token expiration and revocation

When a token has expired or has been revoked, it can no longer be used to authenticate Pixel API requests. Once expired or revoked, a token cannot be restored, you will need to create a new token.

MIME Types

Responses from our API are in JSON format with UTF-8 encoding. Request bodies sent to the API should be in JSON format. A Content-Type header is required whenever you're sending a request body:

Content-Type: application/json

Rate limiting

API requests are limited to 100 requests per day and per authentication token. All authenticated requests will be associated with the user and organisation that generated the token.

Rate limit HTTP headers

The returned HTTP headers of any API request show your current rate limit status:

curl -I "https://api.pxl.to/api/v1/short" \
-H "Authorization: Bearer <YOUR_ACCESS_TOKEN>"
> HTTP/2 200
> Date: Mon, 01 Jul 2022 17:27:06 GMT
> x-ratelimit-limit: 100
> x-ratelimit-remaining: 99
> x-ratelimit-reset: 1658966400
> x-ratelimit-latency: 5
Custom domains