API Key Authentication Instructions

An API key will be provided to you or can be requested via the User API. API keys are tied to a user and carry the same permission as the user from which they originate. API keys can be requested via PUT request to https://sandbox-api.cpxenterprise.com/user/v1/user/{{INSERT-USER-ID}}/generateApiKey

🚧

Expiration

Tokens issued via the following steps will expire every 10 minutes.



Requesting and using Tokens to make API requests


STEP 1: Request a token using the provided API key
curl -X POST \
  https://sandbox-api.cpxenterprise.com/security/v1/apiKey/authenticate \
  -H 'Cache-Control: no-cache' \
  -H 'Content-Type: application/json' \
  -d '{
    "value": "INSERT-YOUR-KEY-HERE"
}'
{"token":"eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXINVALIDvcnRleDAwMDEifQ.eyJpYXQiOjE1MjU5MDQ5NjcsImRhdGFTHISISANINVALIDTOKENI6ImNyaXRpY2FsIiwiZ3JhbnRzIjpbImdsb2JhbCIsInVzZXI6YTk0N2ZiNzQtYmZlMC01ZWNiLTk5ZTEtYmZmMzBjNDZhM2NlIiwiaW5zdGl0dXRpb246NTg2ZDY0YzktMjA0Zi01MDFlLWEwMWUtYTQwNGRhNWY2ZTcxIl0sInJvbGUiOiIxMDYiLCJ1aWQiOiJhOTQ3ZmI3NC1iZmUwLTVlY2ItOTllMS1iZmYzMGM0NmEzY2UiLCJkb21haW4iOnsiaWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDMiLCJjaGFpbiI6WyIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDEiLCIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDMiXX0sImZseUluQWxsb3dlZCI6ZmFsc2UsInVzZXJ0eXBlIjoiZmluINVALIDW5zdGl0dXRpb24iLCJleHAiOjE1MjU5MDU1NjcsImF1ZCI6Imh0dHBzOi8vc2FuZGJveC5tINVALIDiwiaXNzIjoiaHR0cHM6Ly9zYW5kYm94LWFwaS5teGNvbm5lY3QuY29tL3NlY3VyaXR5L3YxIiwic3INVALIDAaW53b3Jrcy5jb20ifQ.SAYpAlUDiPhEh6WM7yG8bhA_QZohePBDIu0fDA5ps_RmxOcroRfZHRGEiINVALIDRrb_jR4GYu4LaVMs8mYw"}

STEP 2: Use the provided token when making calls to CPX Enterprise REST APIs

curl -X GET \
  https://sandbox-api.cpxenterprise.com/institution/v1/institution \
  -H 'Authorization: Bearer eyJhbGciOiJFUzI1NiIsInR5cCI6IkpXINVALIDvcnRleDAwMDEifQ.eyJpYXQiOjE1MjU5MDQ5NjcsImRhdGFTHISISANINVALIDTOKENI6ImNyaXRpY2FsIiwiZ3JhbnRzIjpbImdsb2JhbCIsInVzZXI6YTk0N2ZiNzQtYmZlMC01ZWNiLTk5ZTEtYmZmMzBjNDZhM2NlIiwiaW5zdGl0dXRpb246NTg2ZDY0YzktMjA0Zi01MDFlLWEwMWUtYTQwNGRhNWY2ZTcxIl0sInJvbGUiOiIxMDYiLCJ1aWQiOiJhOTQ3ZmI3NC1iZmUwLTVlY2ItOTllMS1iZmYzMGM0NmEzY2UiLCJkb21haW4iOnsiaWQiOiIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDMiLCJjaGFpbiI6WyIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDEiLCIwMDAwMDAwMC0wMDAwLTAwMDAtMDAwMC0wMDAwMDAwMDAwMDMiXX0sImZseUluQWxsb3dlZCI6ZmFsc2UsInVzZXJ0eXBlIjoiZmluINVALIDW5zdGl0dXRpb24iLCJleHAiOjE1MjU5MDU1NjcsImF1ZCI6Imh0dHBzOi8vc2FuZGJveC5tINVALIDiwiaXNzIjoiaHR0cHM6Ly9zYW5kYm94LWFwaS5teGNvbm5lY3QuY29tL3NlY3VyaXR5L3YxIiwic3INVALIDAaW53b3Jrcy5jb20ifQ.SAYpAlUDiPhEh6WM7yG8bhA_QZohePBDIu0fDA5ps_RmxOcroRfZHRGEiINVALIDRrb_jR4GYu4LaVMs8mYw' \
  -H 'Cache-Control: no-cache'