Add a field to an organization-owned project.
Add a field to an organization-owned project.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “ Path Parameters ”The project’s number.
The organization name. The name is not case sensitive.
Request Body required
Section titled “ Request Body required ”object
The ID of the IssueField to create the field for.
object
The name of the field.
The field’s data type.
object
The name of the field.
The field’s data type.
The options available for single select fields. At least one option must be provided when creating a single select field.
object
The display name of the option.
The color associated with the option.
The description of the option.
object
The name of the field.
The field’s data type.
The configuration for iteration fields.
object
The start date of the first iteration.
The default duration for iterations in days. Individual iterations can override this value.
Zero or more iterations for the field.
object
The title of the iteration.
The start date of the iteration.
The duration of the iteration in days.
Examples
Create a text field
{ "name": "Team notes", "data_type": "text"}Create a number field
{ "name": "Story points", "data_type": "number"}Create a date field
{ "name": "Due date", "data_type": "date"}Create a single select field
{ "name": "Priority", "data_type": "single_select", "single_select_options": [ { "name": { "raw": "Low", "html": "Low" }, "color": "GREEN", "description": { "raw": "Low priority items", "html": "Low priority items" } }, { "name": { "raw": "Medium", "html": "Medium" }, "color": "YELLOW", "description": { "raw": "Medium priority items", "html": "Medium priority items" } }, { "name": { "raw": "High", "html": "High" }, "color": "RED", "description": { "raw": "High priority items", "html": "High priority items" } } ]}Create an iteration field
{ "name": "Sprint", "data_type": "iteration", "iteration_configuration": { "start_day": 1, "duration": 14, "iterations": [ { "title": { "raw": "Sprint 1", "html": "Sprint 1" }, "start_date": "2022-07-01", "duration": 14 }, { "title": { "raw": "Sprint 2", "html": "Sprint 2" }, "start_date": "2022-07-15", "duration": 14 } ] }}Responses
Section titled “ Responses ”Response for adding a field to an organization-owned project.
A field inside a projects v2 project
object
The unique identifier of the field.
The ID of the issue field.
The node ID of the field.
The API URL of the project that contains the field.
The name of the field.
The field’s data type.
The options available for single select fields.
An option for a single select field
object
The unique identifier of the option.
The display name of the option, in raw text and HTML formats.
object
The description of the option, in raw text and HTML formats.
object
The color associated with the option.
Configuration for iteration fields.
object
The day of the week when the iteration starts.
The duration of the iteration in days.
An iteration setting for an iteration field
object
The unique identifier of the iteration setting.
The start date of the iteration.
The duration of the iteration in days.
The iteration title, in raw text and HTML formats.
object
Whether the iteration has been completed.
The time when the field was created.
The time when the field was last updated.
Examples
{ "id": 24680, "node_id": "PVTF_lADOABCD2468024680", "name": "Team notes", "data_type": "text", "project_url": "https://api.github.com/projects/67890", "created_at": "2022-05-15T08:00:00Z", "updated_at": "2022-05-15T08:00:00Z"}{ "id": 13579, "node_id": "PVTF_lADOABCD1357913579", "name": "Story points", "data_type": "number", "project_url": "https://api.github.com/projects/67890", "created_at": "2022-06-01T14:30:00Z", "updated_at": "2022-06-01T14:30:00Z"}{ "id": 98765, "node_id": "PVTF_lADOABCD9876598765", "name": "Due date", "data_type": "date", "project_url": "https://api.github.com/projects/67890", "created_at": "2022-06-10T09:15:00Z", "updated_at": "2022-06-10T09:15:00Z"}{ "id": 12345, "node_id": "PVTF_lADOABCD1234567890", "name": "Priority", "data_type": "single_select", "project_url": "https://api.github.com/projects/67890", "options": [ { "id": "option_1", "name": { "html": "Low", "raw": "Low" }, "color": "GREEN", "description": { "html": "Low priority items", "raw": "Low priority items" } }, { "id": "option_2", "name": { "html": "Medium", "raw": "Medium" }, "color": "YELLOW", "description": { "html": "Medium priority items", "raw": "Medium priority items" } }, { "id": "option_3", "name": { "html": "High", "raw": "High" }, "color": "RED", "description": { "html": "High priority items", "raw": "High priority items" } } ], "created_at": "2022-04-28T12:00:00Z", "updated_at": "2022-04-28T12:00:00Z"}{ "id": 11223, "node_id": "PVTF_lADOABCD1122311223", "name": "Sprint", "data_type": "iteration", "project_url": "https://api.github.com/projects/67890", "configuration": { "duration": 14, "start_day": 1, "iterations": [ { "id": "iter_1", "title": { "html": "Sprint 1", "raw": "Sprint 1" }, "start_date": "2022-07-01", "duration": 14 }, { "id": "iter_2", "title": { "html": "Sprint 2", "raw": "Sprint 2" }, "start_date": "2022-07-15", "duration": 14 } ] }, "created_at": "2022-06-20T16:45:00Z", "updated_at": "2022-06-20T16:45:00Z"}Not modified
Requires authentication
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Forbidden
Basic Error
object
Example generated
{ "message": "example", "documentation_url": "example", "url": "example", "status": "example"}Validation failed, or the endpoint has been spammed.
Validation Error
object
object
Example generated
{ "message": "example", "documentation_url": "example", "errors": [ { "resource": "example", "field": "example", "message": "example", "code": "example", "index": 1, "value": [ "example" ] } ]}