> ## Documentation Index
> Fetch the complete documentation index at: https://docs.manypi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update a custom column

> Change a column's label, type, choices, colours, description, research setting or position. Send only what changes. The `key` never changes, so stored values stay attached.

An API key needs **Leads & companies: Read & write** (`leads:write`), or the legacy `write` permission.



## OpenAPI

````yaml PATCH /api/leads/fields/{id}
openapi: 3.1.0
info:
  title: ManyPI API
  description: >-
    The REST API behind ManyPI — AI lead generation, email validation,
    cold-email outreach, agent runs and web scraping. Every endpoint is
    authenticated with a ManyPI API key (`mpi_...`) or an OAuth 2.1 access
    token, and honours the permissions granted to that credential.


    API keys carry permissions per area of the API (Leads & companies,
    Campaigns, Inboxes & replies, Agents & skills, Scrapers & data, Account &
    usage), each set to Read or Read & write, plus separate permissions for
    actions that spend credits or reach the outside world: Run agents, Run
    scrapers, Verify email addresses, Send outreach and Invoke endpoints. Each
    operation below names what it needs. Keys with the older `read` and `write`
    permissions keep working everywhere.
  version: 2.0.0
  contact:
    name: ManyPI Support
    email: support@manypi.com
    url: https://manypi.com
servers:
  - url: https://app.manypi.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Leads
    description: Find, store, enrich and manage leads.
  - name: Email validation
    description: Verify that lead addresses can receive mail.
  - name: Outreach
    description: Inboxes, sequences, campaigns, sending and replies.
  - name: Agent
    description: Agent runs, replies and skills.
  - name: Scraping
    description: Scrapers, runs and extracted data.
  - name: Endpoints
    description: Publish scrapers as typed REST endpoints.
  - name: Account
    description: Key validation and account information.
  - name: Imports
    description: >-
      Bring campaigns, leads and the do-not-contact list over from another
      outreach tool.
paths:
  /api/leads/fields/{id}:
    patch:
      tags:
        - Leads
      summary: Update a custom column
      description: >-
        Change a column's label, type, choices, colours, description, research
        setting or position. Send only what changes. The `key` never changes, so
        stored values stay attached.


        An API key needs **Leads & companies: Read & write** (`leads:write`), or
        the legacy `write` permission.
      operationId: updateLeadField
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                label:
                  type: string
                  maxLength: 60
                  minLength: 1
                type:
                  type: string
                  enum:
                    - text
                    - long_text
                    - number
                    - url
                    - email
                    - phone
                    - date
                    - boolean
                    - select
                    - multi_select
                  description: >-
                    Switching away from `select` or `multi_select` clears the
                    choices.
                options:
                  type: array
                  maxItems: 50
                  items:
                    type: string
                    minLength: 1
                    maxLength: 80
                option_colors:
                  type: object
                  additionalProperties:
                    type: string
                    enum:
                      - gray
                      - red
                      - orange
                      - amber
                      - green
                      - teal
                      - sky
                      - blue
                      - violet
                      - pink
                description:
                  type: string
                  maxLength: 500
                  nullable: true
                auto_research:
                  type: boolean
                position:
                  type: integer
                  minimum: 0
                  maximum: 500
            example:
              label: Tech stack
              type: multi_select
              options:
                - Shopify
                - WooCommerce
      responses:
        '200':
          description: The updated column.
          content:
            application/json:
              schema:
                type: object
                properties:
                  field:
                    $ref: '#/components/schemas/LeadField'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    LeadField:
      type: object
      properties:
        id:
          type: string
          format: uuid
        key:
          type: string
        label:
          type: string
        type:
          type: string
          enum:
            - text
            - long_text
            - number
            - url
            - email
            - phone
            - date
            - boolean
            - select
            - multi_select
        options:
          type: array
          items:
            type: string
          description: The choices of a `select` or `multi_select` column.
        option_colors:
          type: object
          additionalProperties:
            type: string
            enum:
              - gray
              - red
              - orange
              - amber
              - green
              - teal
              - sky
              - blue
              - violet
              - pink
          description: A colour per choice.
        description:
          type: string
          nullable: true
        auto_research:
          type: boolean
          description: The agent fills this in on future lead searches.
        declared:
          type: boolean
        position:
          type: integer
    Error:
      type: object
      properties:
        error:
          description: >-
            Human-readable message. A few validation failures (creating or
            updating an endpoint, bulk lead updates and deletes) send a list of
            the individual problems here instead of one string.
          oneOf:
            - type: string
            - type: array
              items:
                type: object
                properties:
                  path:
                    type: array
                    items:
                      type:
                        - string
                        - integer
                  message:
                    type: string
        code:
          type: string
          description: >-
            A machine-readable code on gated failures: `lead_limit`,
            `outreach_locked`, `validation_credits_exhausted`.
        details:
          description: >-
            Extra detail on some failures, such as the list of parameters that
            failed an endpoint's `param_schema`.
  responses:
    BadRequest:
      description: The request body or parameters failed validation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: >-
        Missing, invalid or expired credential, or an API key without the
        permission this route needs. Both look the same, so check the key's
        permissions under API Access when a key that worked elsewhere is
        refused. A few routes check the key themselves and answer `403` instead.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    NotFound:
      description: No such resource in this workspace.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        A ManyPI API key (`mpi_...`) from the profile menu → API Access in the
        dashboard, or an OAuth 2.1 access token obtained through the MCP consent
        flow.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.