Protéger le contenu (Consumer Mint)
curl --request POST \
--url https://api.truthlocks.com/v1/consumer/mint \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content_hash": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content_hash: '<string>'})
};
fetch('https://api.truthlocks.com/v1/consumer/mint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/mint"
payload = { "content_hash": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/consumer/mint"
payload := strings.NewReader("{\n \"content_hash\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"protection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attestation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"verify_url": "<string>",
"share_url": "<string>",
"content_hash": "<string>",
"protected_at": "2023-11-07T05:31:56Z",
"status": "protected"
}Consommateur (B2C)
Protéger le contenu (Consumer Mint)
Émettez une attestation cryptographique pour le contenu que vous souhaitez protéger. Votre émetteur personnel et votre clé de signature sont résolus automatiquement. Hachez le contenu côté client (SHA-256) et soumettez le hachage avec les métadonnées du fichier.
POST
/
v1
/
consumer
/
mint
Protéger le contenu (Consumer Mint)
curl --request POST \
--url https://api.truthlocks.com/v1/consumer/mint \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"content_hash": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({content_hash: '<string>'})
};
fetch('https://api.truthlocks.com/v1/consumer/mint', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/mint"
payload = { "content_hash": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/consumer/mint"
payload := strings.NewReader("{\n \"content_hash\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"protection_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"attestation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"verify_url": "<string>",
"share_url": "<string>",
"content_hash": "<string>",
"protected_at": "2023-11-07T05:31:56Z",
"status": "protected"
}Émettez une attestation cryptographique pour un contenu que vous souhaitez protéger. Votre émetteur personnel et votre clé de signature sont résolus automatiquement — vous n’avez pas besoin de créer un émetteur ou d’enregistrer une clé.
Hachez votre contenu côté client avec SHA-256 et soumettez le hachage ainsi que les métadonnées du fichier. Le point de terminaison renvoie un enregistrement de protection avec une URL de preuve partageable que vous pouvez utiliser pour démontrer la paternité.
Les limites de débit dépendent du niveau de votre plan :
La réponse inclut
| Plan | Protections par mois |
|---|---|
| Gratuit | 50 |
| Créateur | 500 |
| Pro | Dépend du plan |
content_hash et protected_at afin que vous puissiez confirmer quel contenu a été protégé et l’horodatage exact sans effectuer d’appel de suivi.
Réponses
Corps
application/json

