---
title: "Add field to user owned project"
method: POST
path: "/users/{username}/projectsV2/{project_number}/fields"
tags: ["projects"]
---

# Add field to user owned project

`POST /users/{username}/projectsV2/{project_number}/fields`

Add a field to a specified user owned project.

## Path parameters

- `username` string, required
- `project_number` integer, required

## Request body

- union
  - object
    - `name` string, required — The name of the field.
    - `data_type` 'text' | 'number' | 'date', required — The field's data type.
  - object
    - `name` string, required — The name of the field.
    - `data_type` 'single_select', required — The field's data type.
    - `single_select_options` ProjectsV2FieldSingleSelectOption[], required — The options available for single select fields. At least one option must be provided when creating a single select field.
      - `name` string — The display name of the option.
      - `color` 'BLUE' | 'GRAY' | 'GREEN' | 'ORANGE' | 'PINK' | 'PURPLE' | 'RED' | 'YELLOW' — The color associated with the option.
      - `description` string — The description of the option.
  - object
    - `name` string, required — The name of the field.
    - `data_type` 'iteration', required — The field's data type.
    - `iteration_configuration` ProjectsV2FieldIterationConfiguration, required — The configuration for iteration fields.
      - `start_date` string, date — The start date of the first iteration.
      - `duration` integer — The default duration for iterations in days. Individual iterations can override this value.
      - `iterations` object[] — Zero or more iterations for the field.
        - `title` string — The title of the iteration.
        - `start_date` string, date — The start date of the iteration.
        - `duration` integer — The duration of the iteration in days.

## Response `201`

Response

- ProjectsV2Field — A field inside a projects v2 project
  - `id` integer, required — The unique identifier of the field.
  - `issue_field_id` integer — The ID of the issue field.
  - `node_id` string — The node ID of the field.
  - `project_url` string, required — The API URL of the project that contains the field.
  - `name` string, required — The name of the field.
  - `data_type` 'assignees' | 'linked_pull_requests' | 'reviewers' | 'labels' | 'milestone' | 'repository' | 'title' | 'text' | 'single_select' | 'number' | 'date' | 'iteration' | 'issue_type' | 'parent_issue' | 'sub_issues_progress', required — The field's data type.
  - `options` ProjectsV2SingleSelectOptions[] — The options available for single select fields.
    - `id` string, required — The unique identifier of the option.
    - `name` object, required — The display name of the option, in raw text and HTML formats.
      - `raw` string, required
      - `html` string, required
    - `description` object, required — The description of the option, in raw text and HTML formats.
      - `raw` string, required
      - `html` string, required
    - `color` string, required — The color associated with the option.
  - `configuration` object — Configuration for iteration fields.
    - `start_day` integer — The day of the week when the iteration starts.
    - `duration` integer — The duration of the iteration in days.
    - `iterations` ProjectsV2IterationSettings[]
      - `id` string, required — The unique identifier of the iteration setting.
      - `start_date` string, date, required — The start date of the iteration.
      - `duration` integer, required — The duration of the iteration in days.
      - `title` object, required — The iteration title, in raw text and HTML formats.
        - `raw` string, required
        - `html` string, required
      - `completed` boolean, required — Whether the iteration has been completed.
  - `created_at` string, date-time, required — The time when the field was created.
  - `updated_at` string, date-time, required — The time when the field was last updated.

## Other responses

- `304` — Not modified
- `401` — Requires authentication
- `403` — Forbidden
- `422` — Validation failed, or the endpoint has been spammed.

---

[API](https://skmtc.net/github/apis/github-v3-rest-api.md) · [All operations](https://skmtc.net/github/apis/github-v3-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/github/github-v3-rest-api/versions/a367f7028301/schema)
