Ingest a record envelope
curl --request POST \
--url https://api.visiqlabs.com/record/envelopes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenantId": "<string>",
"correlationId": "<string>",
"event": {
"type": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"payload": {}
},
"authorization": {
"type": "<string>",
"principal": "<string>",
"scope": "<string>"
},
"actor": {
"type": "<string>",
"id": "<string>",
"name": "<string>",
"metadata": {}
},
"subject": {
"type": "<string>",
"id": "<string>",
"name": "<string>",
"metadata": {}
},
"artifacts": [
{
"artifactType": "<string>",
"contentHash": "<string>",
"mimeType": "<string>",
"storageRef": "<string>",
"metadata": {}
}
],
"attestations": [
{
"attestationType": "<string>",
"issuerType": "<string>",
"issuerId": "<string>",
"statement": {},
"hash": "<string>"
}
]
}
'import requests
url = "https://api.visiqlabs.com/record/envelopes"
payload = {
"tenantId": "<string>",
"correlationId": "<string>",
"event": {
"type": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"payload": {}
},
"authorization": {
"type": "<string>",
"principal": "<string>",
"scope": "<string>"
},
"actor": {
"type": "<string>",
"id": "<string>",
"name": "<string>",
"metadata": {}
},
"subject": {
"type": "<string>",
"id": "<string>",
"name": "<string>",
"metadata": {}
},
"artifacts": [
{
"artifactType": "<string>",
"contentHash": "<string>",
"mimeType": "<string>",
"storageRef": "<string>",
"metadata": {}
}
],
"attestations": [
{
"attestationType": "<string>",
"issuerType": "<string>",
"issuerId": "<string>",
"statement": {},
"hash": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenantId: '<string>',
correlationId: '<string>',
event: {type: '<string>', occurredAt: '2023-11-07T05:31:56Z', payload: {}},
authorization: {type: '<string>', principal: '<string>', scope: '<string>'},
actor: {type: '<string>', id: '<string>', name: '<string>', metadata: {}},
subject: {type: '<string>', id: '<string>', name: '<string>', metadata: {}},
artifacts: [
{
artifactType: '<string>',
contentHash: '<string>',
mimeType: '<string>',
storageRef: '<string>',
metadata: {}
}
],
attestations: [
{
attestationType: '<string>',
issuerType: '<string>',
issuerId: '<string>',
statement: {},
hash: '<string>'
}
]
})
};
fetch('https://api.visiqlabs.com/record/envelopes', 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://api.visiqlabs.com/record/envelopes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tenantId' => '<string>',
'correlationId' => '<string>',
'event' => [
'type' => '<string>',
'occurredAt' => '2023-11-07T05:31:56Z',
'payload' => [
]
],
'authorization' => [
'type' => '<string>',
'principal' => '<string>',
'scope' => '<string>'
],
'actor' => [
'type' => '<string>',
'id' => '<string>',
'name' => '<string>',
'metadata' => [
]
],
'subject' => [
'type' => '<string>',
'id' => '<string>',
'name' => '<string>',
'metadata' => [
]
],
'artifacts' => [
[
'artifactType' => '<string>',
'contentHash' => '<string>',
'mimeType' => '<string>',
'storageRef' => '<string>',
'metadata' => [
]
]
],
'attestations' => [
[
'attestationType' => '<string>',
'issuerType' => '<string>',
'issuerId' => '<string>',
'statement' => [
],
'hash' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.visiqlabs.com/record/envelopes"
payload := strings.NewReader("{\n \"tenantId\": \"<string>\",\n \"correlationId\": \"<string>\",\n \"event\": {\n \"type\": \"<string>\",\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"payload\": {}\n },\n \"authorization\": {\n \"type\": \"<string>\",\n \"principal\": \"<string>\",\n \"scope\": \"<string>\"\n },\n \"actor\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"metadata\": {}\n },\n \"subject\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"metadata\": {}\n },\n \"artifacts\": [\n {\n \"artifactType\": \"<string>\",\n \"contentHash\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"storageRef\": \"<string>\",\n \"metadata\": {}\n }\n ],\n \"attestations\": [\n {\n \"attestationType\": \"<string>\",\n \"issuerType\": \"<string>\",\n \"issuerId\": \"<string>\",\n \"statement\": {},\n \"hash\": \"<string>\"\n }\n ]\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))
}HttpResponse<String> response = Unirest.post("https://api.visiqlabs.com/record/envelopes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tenantId\": \"<string>\",\n \"correlationId\": \"<string>\",\n \"event\": {\n \"type\": \"<string>\",\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"payload\": {}\n },\n \"authorization\": {\n \"type\": \"<string>\",\n \"principal\": \"<string>\",\n \"scope\": \"<string>\"\n },\n \"actor\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"metadata\": {}\n },\n \"subject\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"metadata\": {}\n },\n \"artifacts\": [\n {\n \"artifactType\": \"<string>\",\n \"contentHash\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"storageRef\": \"<string>\",\n \"metadata\": {}\n }\n ],\n \"attestations\": [\n {\n \"attestationType\": \"<string>\",\n \"issuerType\": \"<string>\",\n \"issuerId\": \"<string>\",\n \"statement\": {},\n \"hash\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/record/envelopes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenantId\": \"<string>\",\n \"correlationId\": \"<string>\",\n \"event\": {\n \"type\": \"<string>\",\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"payload\": {}\n },\n \"authorization\": {\n \"type\": \"<string>\",\n \"principal\": \"<string>\",\n \"scope\": \"<string>\"\n },\n \"actor\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"metadata\": {}\n },\n \"subject\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"metadata\": {}\n },\n \"artifacts\": [\n {\n \"artifactType\": \"<string>\",\n \"contentHash\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"storageRef\": \"<string>\",\n \"metadata\": {}\n }\n ],\n \"attestations\": [\n {\n \"attestationType\": \"<string>\",\n \"issuerType\": \"<string>\",\n \"issuerId\": \"<string>\",\n \"statement\": {},\n \"hash\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"record_id": "4b2b8c1e-6f2a-4a1e-9e2b-9d5b0a1c2d3e",
"event_id": "7c1f2a3b-4d5e-6f70-8192-a3b4c5d6e7f8"
}{
"error": "Invalid request body",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized"
}{
"error": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}Records
Ingest a record envelope
Append a signed event (with optional artifacts and attestations) to the tamper-evident audit trail. tenantId must match the authenticated account. Requires permission record_records:create and scope record:write.
POST
/
record
/
envelopes
Ingest a record envelope
curl --request POST \
--url https://api.visiqlabs.com/record/envelopes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tenantId": "<string>",
"correlationId": "<string>",
"event": {
"type": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"payload": {}
},
"authorization": {
"type": "<string>",
"principal": "<string>",
"scope": "<string>"
},
"actor": {
"type": "<string>",
"id": "<string>",
"name": "<string>",
"metadata": {}
},
"subject": {
"type": "<string>",
"id": "<string>",
"name": "<string>",
"metadata": {}
},
"artifacts": [
{
"artifactType": "<string>",
"contentHash": "<string>",
"mimeType": "<string>",
"storageRef": "<string>",
"metadata": {}
}
],
"attestations": [
{
"attestationType": "<string>",
"issuerType": "<string>",
"issuerId": "<string>",
"statement": {},
"hash": "<string>"
}
]
}
'import requests
url = "https://api.visiqlabs.com/record/envelopes"
payload = {
"tenantId": "<string>",
"correlationId": "<string>",
"event": {
"type": "<string>",
"occurredAt": "2023-11-07T05:31:56Z",
"payload": {}
},
"authorization": {
"type": "<string>",
"principal": "<string>",
"scope": "<string>"
},
"actor": {
"type": "<string>",
"id": "<string>",
"name": "<string>",
"metadata": {}
},
"subject": {
"type": "<string>",
"id": "<string>",
"name": "<string>",
"metadata": {}
},
"artifacts": [
{
"artifactType": "<string>",
"contentHash": "<string>",
"mimeType": "<string>",
"storageRef": "<string>",
"metadata": {}
}
],
"attestations": [
{
"attestationType": "<string>",
"issuerType": "<string>",
"issuerId": "<string>",
"statement": {},
"hash": "<string>"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
tenantId: '<string>',
correlationId: '<string>',
event: {type: '<string>', occurredAt: '2023-11-07T05:31:56Z', payload: {}},
authorization: {type: '<string>', principal: '<string>', scope: '<string>'},
actor: {type: '<string>', id: '<string>', name: '<string>', metadata: {}},
subject: {type: '<string>', id: '<string>', name: '<string>', metadata: {}},
artifacts: [
{
artifactType: '<string>',
contentHash: '<string>',
mimeType: '<string>',
storageRef: '<string>',
metadata: {}
}
],
attestations: [
{
attestationType: '<string>',
issuerType: '<string>',
issuerId: '<string>',
statement: {},
hash: '<string>'
}
]
})
};
fetch('https://api.visiqlabs.com/record/envelopes', 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://api.visiqlabs.com/record/envelopes",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'tenantId' => '<string>',
'correlationId' => '<string>',
'event' => [
'type' => '<string>',
'occurredAt' => '2023-11-07T05:31:56Z',
'payload' => [
]
],
'authorization' => [
'type' => '<string>',
'principal' => '<string>',
'scope' => '<string>'
],
'actor' => [
'type' => '<string>',
'id' => '<string>',
'name' => '<string>',
'metadata' => [
]
],
'subject' => [
'type' => '<string>',
'id' => '<string>',
'name' => '<string>',
'metadata' => [
]
],
'artifacts' => [
[
'artifactType' => '<string>',
'contentHash' => '<string>',
'mimeType' => '<string>',
'storageRef' => '<string>',
'metadata' => [
]
]
],
'attestations' => [
[
'attestationType' => '<string>',
'issuerType' => '<string>',
'issuerId' => '<string>',
'statement' => [
],
'hash' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.visiqlabs.com/record/envelopes"
payload := strings.NewReader("{\n \"tenantId\": \"<string>\",\n \"correlationId\": \"<string>\",\n \"event\": {\n \"type\": \"<string>\",\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"payload\": {}\n },\n \"authorization\": {\n \"type\": \"<string>\",\n \"principal\": \"<string>\",\n \"scope\": \"<string>\"\n },\n \"actor\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"metadata\": {}\n },\n \"subject\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"metadata\": {}\n },\n \"artifacts\": [\n {\n \"artifactType\": \"<string>\",\n \"contentHash\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"storageRef\": \"<string>\",\n \"metadata\": {}\n }\n ],\n \"attestations\": [\n {\n \"attestationType\": \"<string>\",\n \"issuerType\": \"<string>\",\n \"issuerId\": \"<string>\",\n \"statement\": {},\n \"hash\": \"<string>\"\n }\n ]\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))
}HttpResponse<String> response = Unirest.post("https://api.visiqlabs.com/record/envelopes")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tenantId\": \"<string>\",\n \"correlationId\": \"<string>\",\n \"event\": {\n \"type\": \"<string>\",\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"payload\": {}\n },\n \"authorization\": {\n \"type\": \"<string>\",\n \"principal\": \"<string>\",\n \"scope\": \"<string>\"\n },\n \"actor\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"metadata\": {}\n },\n \"subject\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"metadata\": {}\n },\n \"artifacts\": [\n {\n \"artifactType\": \"<string>\",\n \"contentHash\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"storageRef\": \"<string>\",\n \"metadata\": {}\n }\n ],\n \"attestations\": [\n {\n \"attestationType\": \"<string>\",\n \"issuerType\": \"<string>\",\n \"issuerId\": \"<string>\",\n \"statement\": {},\n \"hash\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.visiqlabs.com/record/envelopes")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tenantId\": \"<string>\",\n \"correlationId\": \"<string>\",\n \"event\": {\n \"type\": \"<string>\",\n \"occurredAt\": \"2023-11-07T05:31:56Z\",\n \"payload\": {}\n },\n \"authorization\": {\n \"type\": \"<string>\",\n \"principal\": \"<string>\",\n \"scope\": \"<string>\"\n },\n \"actor\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"metadata\": {}\n },\n \"subject\": {\n \"type\": \"<string>\",\n \"id\": \"<string>\",\n \"name\": \"<string>\",\n \"metadata\": {}\n },\n \"artifacts\": [\n {\n \"artifactType\": \"<string>\",\n \"contentHash\": \"<string>\",\n \"mimeType\": \"<string>\",\n \"storageRef\": \"<string>\",\n \"metadata\": {}\n }\n ],\n \"attestations\": [\n {\n \"attestationType\": \"<string>\",\n \"issuerType\": \"<string>\",\n \"issuerId\": \"<string>\",\n \"statement\": {},\n \"hash\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"record_id": "4b2b8c1e-6f2a-4a1e-9e2b-9d5b0a1c2d3e",
"event_id": "7c1f2a3b-4d5e-6f70-8192-a3b4c5d6e7f8"
}{
"error": "Invalid request body",
"details": [
{
"path": [
"agent_id"
],
"message": "Required"
}
]
}{
"error": "Unauthorized"
}{
"error": "insufficient_scope",
"detail": "This API key is not authorized for the requested operation."
}Authorizations
A VisIQ API key presented as Authorization: Bearer vq_prod_.... Mint keys under Connectors -> API Keys in the dashboard.
Body
application/json
Available options:
execute, browser_proxy, session_events, action, isolate, app, retrieval Must match the authenticated account.
Required string length:
1 - 255Required string length:
1 - 255Show child attributes
Show child attributes
Show child attributes
Show child attributes
An actor or subject reference.
Show child attributes
Show child attributes
An actor or subject reference.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I