Create an enrichment
curl --request POST \
--url https://api.metal.ai/v1/enrichments \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <api-key>' \
--data '
{
"resourceType": "company",
"resourceId": "<string>",
"property": "description",
"value": "<unknown>",
"source": "<string>",
"sourceId": "<string>",
"provider": "<string>",
"confidence": 0.5,
"rationale": "<string>"
}
'import requests
url = "https://api.metal.ai/v1/enrichments"
payload = {
"resourceType": "company",
"resourceId": "<string>",
"property": "description",
"value": "<unknown>",
"source": "<string>",
"sourceId": "<string>",
"provider": "<string>",
"confidence": 0.5,
"rationale": "<string>"
}
headers = {
"x-metal-client-id": "<api-key>",
"x-metal-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-metal-client-id': '<api-key>',
'x-metal-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
resourceType: 'company',
resourceId: '<string>',
property: 'description',
value: '<unknown>',
source: '<string>',
sourceId: '<string>',
provider: '<string>',
confidence: 0.5,
rationale: '<string>'
})
};
fetch('https://api.metal.ai/v1/enrichments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.metal.ai/v1/enrichments"
payload := strings.NewReader("{\n \"resourceType\": \"company\",\n \"resourceId\": \"<string>\",\n \"property\": \"description\",\n \"value\": \"<unknown>\",\n \"source\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"provider\": \"<string>\",\n \"confidence\": 0.5,\n \"rationale\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-metal-client-id", "<api-key>")
req.Header.Add("x-metal-api-key", "<api-key>")
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))
}{
"data": {
"id": "<string>",
"property": "<string>",
"value": "<unknown>",
"provider": "<string>",
"source": "<string>",
"sourceId": "<string>",
"confidence": 123,
"capturedOn": "2023-11-07T05:31:56Z"
}
}{
"error": "Invalid request body"
}{
"error": "invalid api key or clientId"
}Create an enrichment
Records an enriched property value on a resource.
POST
/
v1
/
enrichments
Create an enrichment
curl --request POST \
--url https://api.metal.ai/v1/enrichments \
--header 'Content-Type: application/json' \
--header 'x-metal-api-key: <api-key>' \
--header 'x-metal-client-id: <api-key>' \
--data '
{
"resourceType": "company",
"resourceId": "<string>",
"property": "description",
"value": "<unknown>",
"source": "<string>",
"sourceId": "<string>",
"provider": "<string>",
"confidence": 0.5,
"rationale": "<string>"
}
'import requests
url = "https://api.metal.ai/v1/enrichments"
payload = {
"resourceType": "company",
"resourceId": "<string>",
"property": "description",
"value": "<unknown>",
"source": "<string>",
"sourceId": "<string>",
"provider": "<string>",
"confidence": 0.5,
"rationale": "<string>"
}
headers = {
"x-metal-client-id": "<api-key>",
"x-metal-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-metal-client-id': '<api-key>',
'x-metal-api-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
resourceType: 'company',
resourceId: '<string>',
property: 'description',
value: '<unknown>',
source: '<string>',
sourceId: '<string>',
provider: '<string>',
confidence: 0.5,
rationale: '<string>'
})
};
fetch('https://api.metal.ai/v1/enrichments', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.metal.ai/v1/enrichments"
payload := strings.NewReader("{\n \"resourceType\": \"company\",\n \"resourceId\": \"<string>\",\n \"property\": \"description\",\n \"value\": \"<unknown>\",\n \"source\": \"<string>\",\n \"sourceId\": \"<string>\",\n \"provider\": \"<string>\",\n \"confidence\": 0.5,\n \"rationale\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-metal-client-id", "<api-key>")
req.Header.Add("x-metal-api-key", "<api-key>")
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))
}{
"data": {
"id": "<string>",
"property": "<string>",
"value": "<unknown>",
"provider": "<string>",
"source": "<string>",
"sourceId": "<string>",
"confidence": 123,
"capturedOn": "2023-11-07T05:31:56Z"
}
}{
"error": "Invalid request body"
}{
"error": "invalid api key or clientId"
}Authorizations
The Client ID of your API key.
The secret value of your API key.
Body
application/json
Response
Records an enriched property value on a resource.
Show child attributes
Show child attributes
⌘I

