Skip to main content

API Keys

API keys are the recommended way to programmatically authenticate with the API.

Creating an API Key

  1. Navigate to the API Keys page in the PerceptPixel dashboard.
  • Dashboard > Settings > API Keys
  • If you don't have an account, you can Sign Up for one.
  1. Enter a friendly name for the API key, and click "Create".
  2. The API key will be displayed on the page. Make sure to copy it and store it in a safe place.
caution

The API key will only be displayed once. You won't be able to see the API key on the dashboard again.

  1. Use the API key to authenticate with the PerceptPixel API.
note

The format of an API key is pxl_XXXX.YYYY{...}, where XXXX and YYYY are random characters.

The length of a valid API key is 41 characters, consisting of,

  • pxl_XXXX, an 8 character prefix
  • . (a single period, separator)
  • YYYY{...} (a 32 character secret key)

Creating a Key - 01

Creating a Key - 02

Authenticating with an API Key

The API key must be passed as a header to authenticate with the PerceptPixel API.

Authorization: Api-Key ${API_KEY}

Error Handling

Unless otherwise specified, the API will return the status of requests using HTTP status codes as follows.

StatusResponse
200Success
400Bad Request
401Unauthorized
403Forbidden
404Not Found
409Already Exists