// 1. Add criteria to the library
await fetch(`https://embed.nova.dweet.com/v1/criteria-library`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'X-Tenant-Id': tenantId,
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'Demonstrated job stability with 2+ years average tenure',
importance: 'NICE_TO_HAVE',
}),
});
// 2. Add selected criteria to a job (creates independent copies)
await fetch(`https://embed.nova.dweet.com/v1/jobs/${jobId}/criteria/items`, {
method: 'POST',
headers: {
'Authorization': `Bearer ${apiKey}`,
'X-Tenant-Id': tenantId,
'Content-Type': 'application/json',
},
body: JSON.stringify({
text: 'Demonstrated job stability with 2+ years average tenure',
importance: 'NICE_TO_HAVE',
}),
});