---
ref: tool:sendgrid/upsert-contacts
name: Create 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
---

# Create 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.

Note: Asynchronous: a `202` means queued, and the `job_id` shows the import status. To update a contact, send all of its existing identifiers. 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 anything else, confirm access with the cheapest read-only call, like a list or a search. Never send or change anything to test access.

## Rules

- Ask the user before anything that sends messages, costs money, or changes data, and say how many records it touches. One approval covers a batch the user has seen.
- Never print API keys.
