Skip to main content
POST
/
v1
/
prospects
/
save
Save Prospects
curl --request POST \
  --url https://api.example.com/v1/prospects/save \
  --header 'Content-Type: application/json' \
  --data '
{
  "prospects": [
    {
      "name": "<string>",
      "email": "<string>",
      "title": "<string>",
      "company_name": "<string>",
      "linkedin_url": "<string>"
    }
  ],
  "list_id": "<string>"
}
'
{
  "data": {
    "created": 123,
    "contacts": [
      {
        "id": "<string>",
        "full_name": "<string>",
        "email": "<string>"
      }
    ]
  }
}

Request

Headers

Authorization: Bearer wbk_your_api_key_here
Content-Type: application/json

Body Parameters

prospects
array
required
Array of prospect objects to save
list_id
string
Optional: UUID of list to add contacts to

Response

data
object
curl -X POST \
  https://nbkxaqxwvkgbddekwsma.supabase.co/functions/v1/api-gateway/v1/prospects/save \
  -H "Authorization: Bearer wbk_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "prospects": [
      {
        "name": "John Smith",
        "email": "john@example.com",
        "title": "CEO",
        "company_name": "Acme Legal Corp",
        "linkedin_url": "https://linkedin.com/in/johnsmith"
      }
    ],
    "list_id": "abc-123"
  }'

Example Response

{
  "data": {
    "created": 1,
    "contacts": [
      {
        "id": "789e0123-e45b-67c8-a901-234567890abc",
        "full_name": "John Smith",
        "email": "john@example.com",
        "job_title": "CEO",
        "company_name": "Acme Legal Corp"
      }
    ]
  }
}

Complete Workflow Example

Search for prospects, then save them:
# Step 1: Search for prospects
search_response = requests.post(
    f"{BASE_URL}/v1/prospects/search",
    headers=headers,
    json={
        "query": {
            "person_titles": ["CEO"],
            "organization_industries": ["Legal"]
        },
        "per_page": 50
    }
)
prospects = search_response.json()["data"]["prospects"]

# Step 2: Create a list
list_response = requests.post(
    f"{BASE_URL}/v1/lists",
    headers=headers,
    json={"name": "Law Firm CEOs", "description": "Q1 Campaign"}
)
list_id = list_response.json()["data"]["id"]

# Step 3: Save prospects to CRM and list
save_response = requests.post(
    f"{BASE_URL}/v1/prospects/save",
    headers=headers,
    json={
        "prospects": prospects,
        "list_id": list_id
    }
)

result = save_response.json()["data"]
print(f"Saved {result['created']} contacts to list {list_id}")

Duplicate Handling

The API automatically detects duplicate contacts based on email address. If a contact already exists, it will be skipped (not counted in created).

Errors

StatusCodeDescription
400validation_errorInvalid prospect data
401invalid_keyInvalid API key
403insufficient_permissionsMissing write permission
404not_foundList ID not found (if provided)
429rate_limitedRate limit exceeded