# Emisión de ISO mDL con la API de Blerify

### API endpoints para la emisión de licencias

Los siguientes son los endpoints de la API de Blerify para la emisión de mDL:

### **1- endpoint "Create"**

* **Descripción:** Este endpoint se usa para crear un formato ISO mDL.
* **HTTP Method:** `POST`
* **Endpoint URL:** {{api-host}}/api/v1/organizations/{{organization-id}}/projects/{{project-id}}/credentials

{% embed url="<https://dev.blerify.com/?_gl=1*4h2p60*_ga*MTEwMjIzODc2Ny4xNzEyNjc0MjMy*_ga_F58PRL7ZE7*MTczNzU2MTk2Ny40Ni4xLjE3Mzc1NjE5OTEuMC4wLjA.#684c3633-308d-430e-8122-90c0b411b2d8>" %}
Endpoint para crear una credencial digital
{% endembed %}

### **2- "Sign" Endpoint**

* **Descripción:** Este endpoint se usa para firmar la ISO mDL creada en el paso anterior.
* **HTTP Method:** `POST`
* **Endpoint URL:** {{api-host}}/api/v1/organizations/{{organization-id}}/projects/{{project-id}}/crypto/sign/es256

{% embed url="<https://dev.blerify.com/?_gl=1*4h2p60*_ga*MTEwMjIzODc2Ny4xNzEyNjc0MjMy*_ga_F58PRL7ZE7*MTczNzU2MTk2Ny40Ni4xLjE3Mzc1NjE5OTEuMC4wLjA.#03d2be79-d7c7-4045-9e18-d3a016810db1>" %}
Endpoint para firmar una credencial digital
{% endembed %}

### **3- "Assemble" Endpoint**

* **Descripción:** Este endpoint se usa para combinar la ISO mDL y la firma en un solo objeto, que se entrega al usuario final.
* **HTTP Method:** `PUT`
* **Endpoint URL:** {{api-host}}/api/v1/organizations/{{organization-id}}/projects/{{project-id}}/credentials/{{\_credential\_id}}/sign

{% embed url="<https://dev.blerify.com/?_gl=1*4h2p60*_ga*MTEwMjIzODc2Ny4xNzEyNjc0MjMy*_ga_F58PRL7ZE7*MTczNzU2MTk2Ny40Ni4xLjE3Mzc1NjE5OTEuMC4wLjA.#5ccf983a-1dc2-46c9-aa9d-d58fe952eb9c>" %}
Endpoint para ensamblar una credencial digital
{% endembed %}

### Flujo de ejemplo

1. La Service Account se crea en el portal de Blerify y el archivo JSON se descarga.
2. Se usa una librería (preferida por el cliente) para generar el access token.
3. El endpoint "Create" se llama para crear la ISO mDL, enviando el access token en todo momento y generándolo nuevamente si es necesario.
4. Se recibe el Digital Credential ID en la response.
5. El endpoint "Sign" se llama usando el ID de la credencial digital.
6. La firma digital de la ISO mDL se recibe en la response.
7. El endpoint "Assemble" se llama usando el ID de la credencial digital y la firma digital.
8. El objeto completo de la credencial se recibe en la response.
9. Este objeto se entrega al usuario final para que lo descargue en su wallet.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.blerify.com/es/desarrolladores/api-documentation/issuing-iso-mdl-with-the-blerify-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
