---
title: "Set a field on a campaign contact"
method: PATCH
path: "/advanced/contacts"
tags: ["Campaign contacts"]
---

# Set a field on a campaign contact

`PATCH /advanced/contacts`

## Request

- Base URL: `https://api.emelia.io`
- URL: `https://api.emelia.io/advanced/contacts`
- Auth: API key in header `Authorization`

Sets one field of a contact that belongs to the campaign, found by `email` OR `linkedinUrlProfile` (exactly one of them). Spaces are removed from `fieldName`. If `fieldName` is a native field of the contact (for example `firstName`, `jobTitle`, `companyName`) it is overwritten, otherwise a custom variable is created or updated.

## Request body

- union
  - object
    - `campaignId` string, required: MongoDB ObjectId: 24 hexadecimal characters.
    - `email` string, required
    - `linkedinUrlProfile` string
    - `fieldName` string, required
    - `fieldValue` string, required
  - object
    - `campaignId` string, required: MongoDB ObjectId: 24 hexadecimal characters.
    - `email` string
    - `linkedinUrlProfile` string, required
    - `fieldName` string, required
    - `fieldValue` string, required

## Response `200`

Success.

- Success
  - `success` true, required

## Other responses

- `400`: Invalid request.
- `401`: Missing, malformed, unknown or disabled API key. The key must be exactly 48 characters, otherwise it is treated as a session token and rejected the same way.
- `500`: Unexpected error. IMPORTANT: this is also what you receive today when the per minute quota of your account is exceeded (the quota error is not mapped to 429 for API keys). No `Retry-After` header is sent. Wait until the next minute window before retrying.

---

[API](https://skmtc.dev/emelia/apis/emelia-api.md) · [All operations](https://skmtc.dev/emelia/apis/emelia-api/llms.txt) · [OpenAPI document](https://skmtc.dev/emelia/apis/emelia-api/revisions/8c0cb435f2c4?raw)
