cURL
curl --request POST \ --url https://api.getpg.ai/public-api/v1/contacts \ --header 'Content-Type: application/json' \ --header 'x-api-key: <api-key>' \ --data ' { "first_name": "Sarah", "last_name": "Connor", "email": "[email protected]", "job_title": "Director of Sales", "company": "Future Tech Inc" } '
{ "error": "Validation error", "details": [ "Missing required field: \"last_name\"", "Missing required field: \"email\"" ] }
Create a new contact in your PG:AI workspace.
Your PG:AI API key. Generate one from Settings → API Keys in the PG:AI dashboard.
Contact created successfully