---
title: "Set one or many contact fields, by field id or name"
method: POST
path: "/api/v1/contacts/{id}/fields"
---

# Set one or many contact fields, by field id or name

`POST /api/v1/contacts/{id}/fields`

## Request

- Base URL: `https://hivepublish.com`
- URL: `https://hivepublish.com/api/v1/contacts/{id}/fields`
- Auth: HTTP bearer

Runs update_contact with the same scope, permission and approval rules.

## Path parameters

- `id` string, uuid, required

## Headers

- `Idempotency-Key` string, required

## Request body

- object
  - `fieldId` string: The contact field to set.
  - `fieldName` string: The field’s key or name, instead of fieldId.
  - `value` union: The value to store in the field.
    - string
    - number
    - boolean
  - `fields` object[]: Up to 20 fields to set in one call, instead of one field and value.
    - `fieldId` string: The contact field to set.
    - `fieldName` string: The field’s key or name, instead of fieldId.
    - `value` union, required: The value to store.
      - string
      - number
      - boolean
  - `verified` boolean: Mark this value as verified.
  - `updatePolicy` 'replace' | 'if_empty' | 'replace_unverified': What to do when a value is already stored. Defaults to replace_unverified.

## Response `200`

Tool result

- ToolResult
  - `data` unknown, required
  - `meta` object, required
    - `tool` string
    - `workspaceId` string, uuid

## Other responses

- `400`: Invalid input
- `401`: Missing or invalid credential
- `403`: Missing workspace scope, role permission, or plan entitlement

---

[API](https://skmtc.dev/hivepublish/apis/hive-developer-api.md) · [All operations](https://skmtc.dev/hivepublish/apis/hive-developer-api/llms.txt) · [OpenAPI document](https://skmtc.dev/hivepublish/apis/hive-developer-api/revisions/b440c763583e?raw)
