Revoke Credential
curl --request DELETE \
--url https://staging.crossmint.com/api/v1-alpha1/credentials/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://staging.crossmint.com/api/v1-alpha1/credentials/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://staging.crossmint.com/api/v1-alpha1/credentials/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.crossmint.com/api/v1-alpha1/credentials/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/v1-alpha1/credentials/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://staging.crossmint.com/api/v1-alpha1/credentials/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/v1-alpha1/credentials/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"actionId": "201520fc-e0eb-4698-a2f3-c6b50cc7c894",
"action": "nfts.delete",
"status": "pending OR succeeded",
"data": {
"chain": "polygon",
"txId": "succeeded status ONLY - 0x69cf6d971e6745f25f683db9c87663839be02bdaa4a70f0724f490d7335b0081",
"collection": {
"id": "default-polygon",
"contractAddress": "0x67a602CBb306b3DBaaC7ECf55b72EED0E04Dc785"
},
"token": {
"id": "799a6f68-e2ea-4126-8577-4298dfcf900c",
"tokenId": "7"
}
},
"startedAt": "2024-01-10T23:01:45.000Z",
"completedAt": "succeeded status ONLY - 2024-01-10T23:02:00.000Z",
"resource": "https://staging.crossmint.com/api/2022-06-09/collections/default-polygon/nfts/201520fc-e0eb-4698-a2f3-c6b50cc7c894"
}Verifiable Credentials
Revoke Credential
Revoke a verifiable credential by the credential ID. This involves burning the associated nft.
This ID will have the format: urn:uuid:<UUID>. For example: urn:uuid:64f9877d-a19a-4205-8d61-f8c2abed5766
API scope required credentials.create.
DELETE
/
v1-alpha1
/
credentials
/
{id}
Revoke Credential
curl --request DELETE \
--url https://staging.crossmint.com/api/v1-alpha1/credentials/{id} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://staging.crossmint.com/api/v1-alpha1/credentials/{id}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://staging.crossmint.com/api/v1-alpha1/credentials/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://staging.crossmint.com/api/v1-alpha1/credentials/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"X-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://staging.crossmint.com/api/v1-alpha1/credentials/{id}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("X-API-KEY", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://staging.crossmint.com/api/v1-alpha1/credentials/{id}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/v1-alpha1/credentials/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"actionId": "201520fc-e0eb-4698-a2f3-c6b50cc7c894",
"action": "nfts.delete",
"status": "pending OR succeeded",
"data": {
"chain": "polygon",
"txId": "succeeded status ONLY - 0x69cf6d971e6745f25f683db9c87663839be02bdaa4a70f0724f490d7335b0081",
"collection": {
"id": "default-polygon",
"contractAddress": "0x67a602CBb306b3DBaaC7ECf55b72EED0E04Dc785"
},
"token": {
"id": "799a6f68-e2ea-4126-8577-4298dfcf900c",
"tokenId": "7"
}
},
"startedAt": "2024-01-10T23:01:45.000Z",
"completedAt": "succeeded status ONLY - 2024-01-10T23:02:00.000Z",
"resource": "https://staging.crossmint.com/api/2022-06-09/collections/default-polygon/nfts/201520fc-e0eb-4698-a2f3-c6b50cc7c894"
}This is an alpha API and subject to change.
Authorizations
Path Parameters
Response
Success
Can be used to check the status via the action status API
Example:
"201520fc-e0eb-4698-a2f3-c6b50cc7c894"
The URL path to obtain current status with action status api
Example:
"https://staging.crossmint.com/api/2022-06-09/collections/default-polygon/nfts/201520fc-e0eb-4698-a2f3-c6b50cc7c894"
Was this page helpful?

