// Create a person with contact info and company relationships const response = await fetch('https://api.wellapp.ai/v1/people', { method: 'POST', headers: { 'Authorization': 'Bearer your-api-key', 'Content-Type': 'application/json' }, body: JSON.stringify({ data: { type: 'people', attributes: { first_name: 'John', last_name: 'Doe', job_title: 'Software Engineer' }, relationships: { emails: { data: [{ type: 'emails', id: 'temp-email-1' }] }, companies: { data: [{ type: 'companies', id: 'temp-company-1' }] } } }, included: [ { type: 'emails', id: 'temp-email-1', attributes: { value: 'john.doe@example.com', label: 'work' } }, { type: 'companies', id: 'temp-company-1', attributes: { name: 'Tech Corp', role: 'employee', partner_id: 'partner-uuid' } } ] }) });
Was this page helpful?