Manage Contacts
Create, read, update, and delete contacts in your Benchmark Email account using the API.Goal
By the end of this guide you will be able to perform full CRUD operations on contacts: retrieve your contact structure (to get field IDs), create new contacts, retrieve them individually, update their fields or status, and delete them.Prerequisites
- An API key with
contacts:writescope (for full CRUD) orcontacts:readscope (for read-only access) - Your API base URL (found on the Settings > API Keys page)
Steps
1. Fetch your contact structure
Before creating contacts, retrieve your contact structure to get the field IDs you will need. Every contact belongs to a contact structure, and field values are set by referencing each field’s_id.
200 OK):
_id and the field _id values. You will use these when creating and updating contacts. See Manage Custom Fields for more details on contact structures.
2. Create a contact
Send aPOST request with the contact’s email address (key), the contact structure it belongs to, and optionally any custom field values and list assignments.
200 OK):
keyis the contact’s email address (required)contactStructureIdis required — it determines which custom fields are availablefieldsuses the field_idfrom your contact structure (see Step 1)listsoptionally assigns the contact to one or more lists at creation time
3. Get a contact by ID
Retrieve a single contact using its_id.
200 OK):
4. Update a contact’s status
UsePATCH to update a contact’s status (e.g., to deactivate a contact):
200 OK):
PATCH only accepts the status field. To update other fields (email, custom fields, lists, tags), use PUT with the complete contact object.
5. Replace a contact (full update)
UsePUT to replace all contact fields. This is a full replacement — include all fields you want to keep.
6. Delete a contact
200 OK): Returns the deleted contact object.
7. List all contacts
Retrieve all contacts for your account. This endpoint returns all matching contacts in a single response (no pagination). For large contact databases, use Search Contacts instead, which supports pagination and filtering.200 OK):
Common Errors
| Status | Error | Cause | Fix |
|---|---|---|---|
401 | UnauthorizedError | Invalid, expired, or inactive API key | Verify your key is correct and active in Settings > API Keys |
403 | ForbiddenError — missing scope | Key lacks contacts:write scope | Create a new key with contacts:write scope, or upgrade the existing key’s scopes |
400 | ValidationError | Missing required fields (e.g., key, contactStructureId on create) | Check the request body includes all required fields |
400 | DuplicateFieldError | Duplicate email address within the same contact structure | Use Search Contacts to check for existing contacts before creating |
404 | RecordNotFound | Contact ID does not exist | Verify the contact ID; it may have been deleted |
429 | TooManyRequestsError | Rate limit or monthly quota exceeded | Wait for the Retry-After period and retry. See Rate Limits |
Next Steps
- Search Contacts — find contacts by email or custom field values
- Manage Lists — organize contacts into lists
- Manage Custom Fields — define the fields available on your contacts
- Migration from Legacy — end-to-end workflow for importing your data