v56

latestOpenAPI 3.0.3MITraw.githubusercontent.com2026-08-011,4581,08113.3 MB
projects

Create a view for a user-owned project

Create a new view in a user-owned project. Views allow you to customize how items in a project are displayed and filtered.

post/users/{user_id}/projectsV2/{project_number}/views

Path parameters

user_idstring required

The unique identifier of the user.

project_numberinteger required

The project's number.

Request body

namestring required

The name of the view.

layout'table' | 'board' | 'roadmap' required

The layout of the view.

filterstring

The filter query for the view. See Filtering projects for more information.

visible_fieldsinteger[]

visible_fields is not applicable to roadmap layout views. For table and board layouts, this represents the field IDs that should be visible in the view. If not provided, the default visible fields will be used.

Example request

{
  "name": "Sprint Board",
  "layout": "board",
  "filter": "is:issue is:open",
  "visible_fields": [
    123,
    456,
    789
  ]
}

Response

Response for creating a view in a user-owned project.

idinteger required

The unique identifier of the view.

numberinteger required

The number of the view within the project.

namestring required

The name of the view.

layout'table' | 'board' | 'roadmap' required

The layout of the view.

node_idstring required

The node ID of the view.

project_urlstring required

The API URL of the project that contains the view.

html_urlstring uri required

The web URL of the view.

created_atstring date-time required

The time when the view was created.

updated_atstring date-time required

The time when the view was last updated.

filterstring nullable

The filter query for the view.

visible_fieldsinteger[] required

The list of field IDs that are visible in the view.

group_byinteger[] required

The list of field IDs used for horizontal grouping.

vertical_group_byinteger[] required

The list of field IDs used for vertical grouping (board layout).

Example response

{
  "project_url": "https://api.github.com/orgs/octocat/projectsV2/1",
  "html_url": "https://github.com/orgs/octocat/projects/1/views/1",
  "creator": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
    "url": "https://api.github.com/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "type": "User",
    "starred_at": "\"2020-07-09T00:17:55Z\"",
    "user_view_type": "public"
  },
  "created_at": "2022-04-28T12:00:00Z",
  "updated_at": "2022-04-28T12:00:00Z",
  "filter": "is:issue is:open"
}