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

Create a field in a user-owned project

Creates a field in a project owned by the specified user. Choose a data_type of text, number, date, single_select, or iteration and provide the configuration required for that type. A 201 response returns the created field, including its identifier and project URL.

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

2 parameters · 2 body fields
usernamestringrequired
The handle of the user who owns the project.
project_numberintegerrequired
The number of the project in which to create the field.

Field definition for the project. The required fields and configuration depend on the selected data_type.

namestringrequired
The name of the field.
data_typestringrequired
The field's data type.
Allowed:textnumberdate

5 status codes
201Returns the created project field, including its identifier, name, data type, creation and update timestamps, and project URL.
idintegerrequired
The unique identifier of the field.
issue_field_idintegeroptional
The ID of the issue field.
node_idstringoptional
The node ID of the field.
project_urlstringrequired
The API URL of the project that contains the field.
namestringrequired
The name of the field.
data_typestringrequired
The field's data type.
Allowed:assigneeslinked_pull_requestsreviewerslabelsmilestonerepositorytitletextsingle_selectnumberdateiteration
optionsarray<ProjectsV2SingleSelectOption>optional
The options available for single select fields.
configurationobjectoptional
Configuration for iteration fields.
created_atstringrequired
The time when the field was created.
updated_atstringrequired
The time when the field was last updated.
304Indicates that the requested representation has not changed.
401Returned when authentication is required but missing or invalid.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
403Returned when the authenticated user is not permitted to create a field in the project.
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional
422Returned when validation fails or the endpoint has been spammed.
messagestringrequired
documentation_urlstringrequired
errorsarray<object>optional

Error handling

A 401 is returned when authentication is required but missing or invalid. A 403 is returned when you are not permitted to create a field in the project. A 422 is returned when validation fails or the endpoint has been spammed. name and data_type are required; data_type must be text, number, date, single_select, or iteration. For a single-select field, provide at least one single_select_options entry; for an iteration field, provide iteration_configuration with start_date and duration.