Getting started with the API

Acreditta’s REST API lets you automate the issuance, lookup, and management of digital credentials from your own systems. This guide takes you from zero to your first authenticated call.

1. Get your API Key

  1. Go to Integrations → API in the side menu.
  2. Click Create APIKey.
  3. Type a descriptive name to identify the key (for example, the system that will use it) and click Create.

⚠️ Important: the API Key value is only shown once, at the moment you create it. Save it somewhere safe — you won’t be able to see it again from the platform.

This gives you a DeveloperUser: a user with username API User and password API Key. These are the two values you’ll use to authenticate against the API, not your regular Acreditta username and password.

2. Authenticate and get your tokens

Log in against the /login endpoint with your API User and API Key:

curl -X 'POST' \
  'https://public-api.acreditta.com/login' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "username": "YOUR_API_USER",
  "password": "YOUR_API_KEY_VALUE"
}'

The response includes two values:

  • idToken: use it as a Bearer Token (Authorization: Bearer <idToken>) in every subsequent call.
  • refreshToken: save it to request a new idToken once the current one expires, against /login/refresh-token.

3. Make your first call

With the idToken you can consume any protected endpoint, for example the credential status report:

curl -X 'GET' \
  'https://public-api.acreditta.com/report/credential/status' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ID_TOKEN'

Available environments

Environment Base URL
Production https://public-api.acreditta.com
Sandbox (testing) https://publicapi-demo.acreditta.app

🔎 Note: always use the sandbox while developing your integration — credentials you issue there don’t count against your production quota.

Full reference

The complete list of routes, parameters, and request/response schemas lives in Swagger: https://public-api.acreditta.com/swagger/#/. It’s the source of truth — this guide and the following ones show you how to use the API, they don’t replace that reference.

Typical integration flow

Once you can authenticate, this is the usual order in which an integration (for example, with an LMS or an academic ERP) tends to use the endpoints together:

  1. Authenticate against the API with /login using your API User and API Key.
  2. Let your institution’s administrator associate a recognition template with their course, searching your organization’s templates with /template/list (accepts a search parameter).
  3. (Optional) Let them also associate an approval flow with the course, listing your organization’s available flows with /flows.
  4. Persist the credentialTemplateId and, if applicable, the flowId the administrator selected, associating them with the course inside your own system.

From there, the path branches depending on whether the course ended up with an approval flow associated:

With an approval flow:

  1. When a group of students meets the conditions to receive the credential, open a batch with POST /credential/batch/create and keep the returned batchId in memory.
  2. Go through the group of students and add each one to the batch with POST /credential/issue, passing the batchId as a query parameter (?batch_id={batchId}).
  3. When you’re done adding students, close the batch with PATCH /credential/batch/close/{batchId}, including in the body the flowId you persisted in step 4 — that’s what triggers the review process.

Without an approval flow (simple issuance):

  1. Issue the credential directly when the student meets the conditions, with POST /credential/issue (no batch_id).

🔎 Note: the batch_id parameter is what determines whether an issuance is associated with a batch under review or not — with or without an approval flow, the endpoint that issues is always the same, /credential/issue.

Next step

Need help?

Write to us at tech@acreditta.com if you have questions during your integration.


CONTENIDO