> For the complete documentation index, see [llms.txt](https://developerdocs.instructure.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developerdocs.instructure.com/services/canvas/resources/tabs.md). Agents can also search and read this documentation through its [MCP server](https://developerdocs.instructure.com/~gitbook/mcp).

# Tabs

#### A Tab object looks like: <a href="#tab" id="tab"></a>

```js
{
  "html_url": "/courses/1/external_tools/4",
  "id": "context_external_tool_4",
  "label": "WordPress",
  "type": "external",
  // only included if true
  "hidden": true,
  // possible values are: public, members, admins, and none
  "visibility": "public",
  // 1 based
  "position": 2
}
```

## [List available tabs for a course or group](#method.tabs.index) <a href="#method.tabs.index" id="method.tabs.index"></a>

[TabsController#index](https://github.com/instructure/canvas-lms/blob/master/app/controllers/tabs_controller.rb)

#### `GET /api/v1/accounts/:account_id/tabs`

**Scope:** `url:GET|/api/v1/accounts/:account_id/tabs`

**OpenAPI reference:** [GET /api/v1/accounts/{account\_id}/tabs](https://developerdocs.instructure.com/services/canvas/openapi-reference/openapi_tabs.md#get-api-v1-accounts-account_id-tabs)

#### `GET /api/v1/courses/:course_id/tabs`

**Scope:** `url:GET|/api/v1/courses/:course_id/tabs`

**OpenAPI reference:** [GET /api/v1/courses/{course\_id}/tabs](https://developerdocs.instructure.com/services/canvas/openapi-reference/openapi_tabs.md#get-api-v1-courses-course_id-tabs)

#### `GET /api/v1/groups/:group_id/tabs`

**Scope:** `url:GET|/api/v1/groups/:group_id/tabs`

**OpenAPI reference:** [GET /api/v1/groups/{group\_id}/tabs](https://developerdocs.instructure.com/services/canvas/openapi-reference/openapi_tabs.md#get-api-v1-groups-group_id-tabs)

#### `GET /api/v1/users/:user_id/tabs`

**Scope:** `url:GET|/api/v1/users/:user_id/tabs`

Returns a list of navigation tabs available in the current context.

#### Request Parameters:

| Parameter   | Type     | Description                                                                                                                                                                                                                                                                                                                                                        |
| ----------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `include[]` | `string` | <p>- "course\_subject\_tabs": Optional flag to return the tabs associated with a canvas\_for\_elementary subject course's<br>home page instead of the typical sidebar navigation. Only takes effect if this request is for a course context<br>in a canvas\_for\_elementary-enabled account or sub-account. Allowed values: <code>course\_subject\_tabs</code></p> |

#### Example Request:

```bash
curl -H 'Authorization: Bearer <token>' \
     https://<canvas>/api/v1/groups/<group_id>/tabs"
```

#### Example Response:

```js
[
  {
    "html_url": "/courses/1",
    "id": "home",
    "label": "Home",
    "position": 1,
    "visibility": "public",
    "type": "internal"
  },
  {
    "html_url": "/courses/1/external_tools/4",
    "id": "context_external_tool_4",
    "label": "WordPress",
    "hidden": true,
    "visibility": "public",
    "position": 2,
    "type": "external"
  },
  {
    "html_url": "https://example.com/resource",
    "id": "nav_menu_link_5",
    "label": "External Resource",
    "position": 3,
    "visibility": "public",
    "type": "external"
  },
  {
    "html_url": "/courses/1/pages/some_wiki_page",
    "id": "nav_menu_link_6",
    "label": "Instructor-/Admin-added link to resource",
    "position": 4,
    "visibility": "public",
    "type": "external"
  },
  {
    "html_url": "/courses/1/grades",
    "id": "grades",
    "label": "Grades",
    "position": 5,
    "hidden": true,
    "visibility": "admins",
    "type": "internal"
  }
]
```

**OpenAPI reference:** [GET /api/v1/users/{user\_id}/tabs](https://developerdocs.instructure.com/services/canvas/openapi-reference/openapi_tabs.md#get-api-v1-users-user_id-tabs)

## [Create a tab for a course](#method.tabs.create) <a href="#method.tabs.create" id="method.tabs.create"></a>

[TabsController#create](https://github.com/instructure/canvas-lms/blob/master/app/controllers/tabs_controller.rb)

#### `POST /api/v1/courses/:course_id/tabs`

**Scope:** `url:POST|/api/v1/courses/:course_id/tabs`

The new link is added last among the visible tabs, above Settings. The returned tab has a null position. List the tabs to see its position.

Requires the manage\_nav\_menu\_links and update\_nav permissions on the course. Responds 404 if custom navigation links are not enabled for the root account.

#### Request Parameters:

| Parameter | Type              | Description                                                                                                           |
| --------- | ----------------- | --------------------------------------------------------------------------------------------------------------------- |
| `label`   | Required `string` | The label for the new tab, max 255 characters                                                                         |
| `url`     | Required `string` | <p>The URL for the new tab, max 2048 characters.<br>Must be an http or https URL, or a path that starts with "/".</p> |
| `hidden`  | `boolean`         | Whether the tab should be hidden. Defaults to false.                                                                  |

#### Example Request:

```bash
curl https://<canvas>/api/v1/courses/<course_id>/tabs \
  -X POST \
  -H 'Authorization: Bearer <token>' \
  -d 'label=Test Link' \
  -d 'url=https://example.com' \
  -d 'hidden=true'
```

Returns a [Tab](#tab) object.

**OpenAPI reference:** [POST /api/v1/courses/{course\_id}/tabs](https://developerdocs.instructure.com/services/canvas/openapi-reference/openapi_tabs.md#post-api-v1-courses-course_id-tabs)

## [Update a tab for a course](#method.tabs.update) <a href="#method.tabs.update" id="method.tabs.update"></a>

[TabsController#update](https://github.com/instructure/canvas-lms/blob/master/app/controllers/tabs_controller.rb)

#### `PUT /api/v1/courses/:course_id/tabs/:tab_id`

**Scope:** `url:PUT|/api/v1/courses/:course_id/tabs/:tab_id`

Home and Settings tabs are not manageable, and can't be hidden or moved

Returns a tab object

#### Request Parameters:

| Parameter  | Type      | Description                          |
| ---------- | --------- | ------------------------------------ |
| `position` | `integer` | The new position of the tab, 1-based |
| `hidden`   | `boolean` | no description                       |

#### Example Request:

```bash
curl https://<canvas>/api/v1/courses/<course_id>/tabs/tab_id \
  -X PUT \
  -H 'Authorization: Bearer <token>' \
  -d 'hidden=true' \
  -d 'position=2' // 1 based
```

Returns a [Tab](#tab) object.

**OpenAPI reference:** [PUT /api/v1/courses/{course\_id}/tabs/{tab\_id}](https://developerdocs.instructure.com/services/canvas/openapi-reference/openapi_tabs.md#put-api-v1-courses-course_id-tabs-tab_id)

## [Delete a tab for a course](#method.tabs.destroy) <a href="#method.tabs.destroy" id="method.tabs.destroy"></a>

[TabsController#destroy](https://github.com/instructure/canvas-lms/blob/master/app/controllers/tabs_controller.rb)

#### `DELETE /api/v1/courses/:course_id/tabs/:tab_id`

**Scope:** `url:DELETE|/api/v1/courses/:course_id/tabs/:tab_id`

Returns 204 No Content on success

Requires the manage\_nav\_menu\_links and update\_nav permissions on the course. Responds 404 if custom navigation links are not enabled for the root account.

#### Request Parameters:

| Parameter | Type              | Description                                                                                                                                                                                             |
| --------- | ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `tab_id`  | Required `string` | <p>The ID of the link to delete, in the form<br>nav\_menu\_link\_\<id>. Only links created on this course can be deleted.<br>Built-in tabs, external tool tabs, and account-level links return 404.</p> |

#### Example Request:

```bash
curl https://<canvas>/api/v1/courses/<course_id>/tabs/<tab_id> \
  -X DELETE \
  -H 'Authorization: Bearer <token>'
```

**OpenAPI reference:** [DELETE /api/v1/courses/{course\_id}/tabs/{tab\_id}](https://developerdocs.instructure.com/services/canvas/openapi-reference/openapi_tabs.md#delete-api-v1-courses-course_id-tabs-tab_id)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://developerdocs.instructure.com/services/canvas/resources/tabs.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
