Get Action Status
curl --request GET \
--url https://staging.crossmint.com/api/2022-06-09/actions/{actionId} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://staging.crossmint.com/api/2022-06-09/actions/{actionId}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://staging.crossmint.com/api/2022-06-09/actions/{actionId}', 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/2022-06-09/actions/{actionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/2022-06-09/actions/{actionId}"
req, _ := http.NewRequest("GET", 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.get("https://staging.crossmint.com/api/2022-06-09/actions/{actionId}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/actions/{actionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"actionId": "66881a4d-eff9-467a-b19d-a2ff76eef5c2",
"action": "nfts.create",
"status": "pending",
"data": {
"collection": {
"id": "someCollection",
"contractAddress": "0x0B7c736cD6D517b6AFfB3F6151eC662B0000018B"
},
"recipient": {
"walletAddress": "0x6Def4FF2Efe3731EB2Ca09c625d21bfd6da00000"
},
"token": {
"id": "66881a4d-eff9-467a-b19d-a2ff76eef5c2"
}
},
"startedAt": "2023-10-02T22:10:41.000Z",
"resource": "https://staging.crossmint.com/api/2022-06-09/actions/66881a4d-eff9-467a-b19d-a2ff76eef5c2"
}{
"error": true,
"message": "Malformed API key. / API key provided doesn't have required scopes."
}{
"error": true,
"message": "Not found"
}{
"error": true,
"message": "A timeout occurred."
}Action Status
Get Action Status
Use this API to poll for the status of asynchonous actions such as NFT mints, transfers, etc.
API scope required: nfts.create
GET
/
2022-06-09
/
actions
/
{actionId}
Get Action Status
curl --request GET \
--url https://staging.crossmint.com/api/2022-06-09/actions/{actionId} \
--header 'X-API-KEY: <api-key>'import requests
url = "https://staging.crossmint.com/api/2022-06-09/actions/{actionId}"
headers = {"X-API-KEY": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-KEY': '<api-key>'}};
fetch('https://staging.crossmint.com/api/2022-06-09/actions/{actionId}', 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/2022-06-09/actions/{actionId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
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/2022-06-09/actions/{actionId}"
req, _ := http.NewRequest("GET", 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.get("https://staging.crossmint.com/api/2022-06-09/actions/{actionId}")
.header("X-API-KEY", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://staging.crossmint.com/api/2022-06-09/actions/{actionId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-KEY"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"actionId": "66881a4d-eff9-467a-b19d-a2ff76eef5c2",
"action": "nfts.create",
"status": "pending",
"data": {
"collection": {
"id": "someCollection",
"contractAddress": "0x0B7c736cD6D517b6AFfB3F6151eC662B0000018B"
},
"recipient": {
"walletAddress": "0x6Def4FF2Efe3731EB2Ca09c625d21bfd6da00000"
},
"token": {
"id": "66881a4d-eff9-467a-b19d-a2ff76eef5c2"
}
},
"startedAt": "2023-10-02T22:10:41.000Z",
"resource": "https://staging.crossmint.com/api/2022-06-09/actions/66881a4d-eff9-467a-b19d-a2ff76eef5c2"
}{
"error": true,
"message": "Malformed API key. / API key provided doesn't have required scopes."
}{
"error": true,
"message": "Not found"
}{
"error": true,
"message": "A timeout occurred."
}The shape of the data property in the
200 response for this API depends on the type of action initially performed.
For example, minting/burning an NFT, creating/updating a collection or template, or NFT transfers.action property will indicate the type of action originally performed and will be one of:
nfts.createnfts.deletenfts.updatecollections.createcollections.updatewallets:nfts.transfer
Authorizations
Obtained in the Crossmint developer console
Path Parameters
The actionId.
Response
Success
Example:
"66881a4d-eff9-467a-b19d-a2ff76eef5c2"
Example:
"nfts.create"
Example:
"pending"
Show child attributes
Show child attributes
Example:
"2023-10-02T22:10:41.000Z"
Example:
"https://staging.crossmint.com/api/2022-06-09/actions/66881a4d-eff9-467a-b19d-a2ff76eef5c2"
Was this page helpful?

