Issue credentials via API

These endpoints let you issue digital credentials from your own systems: one at a time, by updating an issued one, or in a batch that goes through an approval flow. The common conventions (base URL, dates, errors) are in API Endpoints.

POST /credential/issue

Issues a digital credential to an Earner. It also updates an issued credential or adds it to an open batch.

Headers

Header Required Value
Authorization Yes Bearer <idToken>
Content-Type Yes application/json

Query parameters

Parameter Type Required Description
batch_id integer No ID of an open batch, returned by POST /credential/batch/create. If you send it, the credential is added to that batch and waits for its review; otherwise it is issued immediately.

Body

Field Type Required Description
credentialTemplateId string Yes ID of the credential template you’re issuing. Get it with GET /template/list.
firstName string Yes Earner’s first name.
lastName string No Earner’s last name.
email string (email) Yes Earner’s email. Receives the notification if sendNotification is true.
phoneNumber string No Mobile number with country code, for example +573203133677.
identification string No Earner’s identification number.
awardedAt string (date) Yes Award date, in YYYY-MM-DD format.
expiresAt string (date) No Expiration date, in YYYY-MM-DD format. Omit it if the credential doesn’t expire.
creditHours integer No Credit hours associated with the achievement.
licenseNumber string No License or registration number.
result string No Result or grade obtained.
programStartDate string (date) No Start date of the program or activity, in YYYY-MM-DD format.
programEndDate string (date) No End date of the program or activity, in YYYY-MM-DD format.
degreeCertificate string No Number or identifier of the degree certificate or diploma.
book string No Registry book, if your institution uses it.
sheet string No Registry page, if your institution uses it.
evidences array (max 5) No Evidence of the achievement. Each item accepts name, description, and url; if you send description or url, name is required.
evidenceAnnexe object No Additional annex with annexe (content) and type (markdown or url).
issuingTags array of string No Free-form tags to classify the issuance. You can filter by them later in the list and the report.
sendNotification boolean No true emails the Earner as soon as the credential is issued; false issues silently.
overwriteRecord object No Overrides the record’s design, texts, or images for this issuance only. See overwriteRecord.
updateCredential boolean No true updates an issued credential instead of creating a new one. Defaults to false.
credentialUUID string Conditional Required when updateCredential is true: identifies the credential you’re updating.

Example

curl -X 'POST' \
  'https://public-api.acreditta.com/credential/issue' \
  -H 'accept: application/json' \
  -H 'Authorization: Bearer ID_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
  "credentialTemplateId": "string",
  "firstName": "Ana",
  "lastName": "Pérez",
  "email": "ana.perez@ejemplo.com",
  "awardedAt": "2026-11-19",
  "evidences": [
    { "name": "Proyecto final", "url": "https://ejemplo.com/proyecto" }
  ],
  "issuingTags": ["cohorte-2026"],
  "sendNotification": true
}'

200 response

Field Type Description
credentialId string (UUID) Identifier of the issued credential. Use it in the query, record, and revoke routes.
transactionBlock string Blockchain transaction record.
acceptanceLink string (URL) Link for the Earner to accept the credential.
rejectionLink string (URL) Link for the Earner to reject the credential.

Errors: 401, 402, and 406 (for example, a missing required field or a date with an invalid format).

🔎 Note: to update an issued credential, send updateCredential: true together with credentialUUID. In that case overwriteRecord has no effect.

POST /credential/batch/create

Creates an empty issuance batch for a template. Use it when credentials must go through an approval flow before they’re issued.

Headers: Authorization: Bearer <idToken> and Content-Type: application/json, both required.

Body

Field Type Required Description
credentialTemplateId string Yes ID of the template that every credential in the batch will use.

200 response

Field Type Description
id integer Batch ID. Use it as batch_id in POST /credential/issue and as batchId when closing it.
name string Batch name.
status string Batch status.
badge_template object Template associated with the batch.
created_at string (date-time) Creation date.

Errors: 401, 402, and 406.

PATCH /credential/batch/close/{batchId}

Closes a batch and sends it to the given approval flow.

Headers: Authorization: Bearer <idToken> and Content-Type: application/json, both required.

Path parameters

Parameter Type Required Description
batchId integer Yes Batch ID, returned as id by POST /credential/batch/create.

Body

Field Type Required Description
flowId string (UUID) Yes ID of the approval flow that will review the batch. Get it with GET /flows.

200 response

Field Type Description
id integer Batch ID.
status string Batch status after closing it.
recordsCount integer Number of credentials in the batch.
credentialTemplate object Template associated with the batch.
taskId string ID of the task that processes the batch.
message string Confirmation message.

Errors: 401, 402, and 406.

Full batch issuance flow

  1. Create the batch with POST /credential/batch/create and save the id it returns.
  2. Add each Earner with POST /credential/issue?batch_id={id}.
  3. Close the batch with PATCH /credential/batch/close/{id}, sending the flowId in the body. That triggers the review.

⚠️ Important: without batch_id, POST /credential/issue issues the credential immediately and it doesn’t go through any approval flow.


CONTENIDO