---
ref: tool:sendgrid/upsert-contacts
name: Add or update contacts
company: company:sendgrid
workflows: []
access: [api]
tags: [capability:build-audience, category:email, has:api]
docs: https://www.twilio.com/docs/sendgrid/api-reference/contacts/add-or-update-a-contact
updated: 2026-09-27
---

# Add or update contacts

Queues up to 30,000 contacts, or 6 MB, to be created or updated in Marketing Campaigns and returns a job ID.

Processing is asynchronous: a `202` means queued, and the `job_id` shows the
import status. To update a contact, send all of its existing identifiers;
fields you leave out keep their values. Create custom fields before you set
them.

## Set up

Use the first option your agent supports.

### API (official)

- Base URL: https://api.sendgrid.com
- Endpoint: `PUT /v3/marketing/contacts`
- Auth: send the header `Authorization: Bearer $SENDGRID_API_KEY`
- Get a key: https://app.sendgrid.com/settings/api_keys
- Docs: https://www.twilio.com/docs/sendgrid/api-reference

Before doing anything else, make one read-only call to confirm access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data.
- Never print API keys.
