Front Views API

The Views API from Front — 4 operation(s) for views.

Documentation

Specifications

OpenAPI Specification

front-views-api-openapi.yml Raw ↑
openapi: 3.0.0
info:
  version: 1.0.0
  title: Channel Accounts Views API
  contact:
    name: Front Platform
    url: https://community.front.com
servers:
- url: https://api2.frontapp.com
security:
- http: []
tags:
- name: Views
paths:
  /teams/{team_id}/views:
    get:
      summary: List team views
      operationId: list-team-views
      description: 'List the views of a team.


        Required scope: `views:read`'
      tags:
      - Views
      parameters:
      - in: path
        name: team_id
        required: true
        description: The team ID
        schema:
          type: string
          default: tim_xyz
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/pageToken'
      responses:
        '200':
          $ref: '#/components/responses/listOfViews'
      x-required-scopes:
      - views:read
    post:
      summary: Create team view
      operationId: create-team-view
      description: 'Create a new view for a team.


        Required scope: `views:write`'
      tags:
      - Views
      parameters:
      - in: path
        name: team_id
        required: true
        description: The team ID
        schema:
          type: string
          default: tim_xyz
      requestBody:
        description: View to create
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateView'
      responses:
        '201':
          $ref: '#/components/responses/view'
      x-required-scopes:
      - views:write
  /views:
    get:
      summary: List views
      operationId: list-views
      description: 'List the views accessible to the authenticated token.


        Required scope: `views:read`'
      tags:
      - Views
      parameters:
      - $ref: '#/components/parameters/limit'
      - $ref: '#/components/parameters/pageToken'
      responses:
        '200':
          $ref: '#/components/responses/listOfViews'
      x-required-scopes:
      - views:read
  /views/{view_id}:
    get:
      summary: Get view
      operationId: get-view
      description: 'Fetch a view.


        Required scope: `views:read`'
      tags:
      - Views
      parameters:
      - in: path
        name: view_id
        required: true
        description: The view ID
        schema:
          type: string
          default: lns_abc123
      responses:
        '200':
          $ref: '#/components/responses/view'
      x-required-scopes:
      - views:read
    patch:
      summary: Update view
      operationId: update-view
      description: 'Update a view.


        Required scope: `views:write`'
      tags:
      - Views
      parameters:
      - in: path
        name: view_id
        required: true
        description: The view ID
        schema:
          type: string
          default: lns_abc123
      requestBody:
        description: View properties to update
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateView'
      responses:
        '204':
          description: No content
      x-required-scopes:
      - views:write
  /views/{view_id}/teammates:
    post:
      summary: Add view to teammate sidebars
      operationId: add-view-teammates
      description: 'Makes this view visible in specified teammates'' sidebar navigation.


        Required scope: `views:write`'
      tags:
      - Views
      parameters:
      - in: path
        name: view_id
        required: true
        description: The view ID
        schema:
          type: string
          default: lns_abc123
      requestBody:
        description: Teammate IDs to add. Alternatively, you can supply emails as a [resource alias](https://dev.frontapp.com/docs/resource-aliases-1).
        content:
          application/json:
            schema:
              type: object
              required:
              - teammate_ids
              properties:
                teammate_ids:
                  type: array
                  items:
                    type: string
      responses:
        '204':
          description: No content
      x-required-scopes:
      - views:write
components:
  schemas:
    SharedViewResponse:
      type: object
      required:
      - _links
      - id
      - name
      - highlight
      - inbox_ids
      - tag_ids
      - not_tag_ids
      - no_tags
      - assignee_ids
      - not_assignee_ids
      properties:
        _links:
          type: object
          properties:
            self:
              type: string
              description: Link to resource
              example: https://yourCompany.api.frontapp.com/views/lns_abc123
            related:
              type: object
              properties:
                owner:
                  type: string
                  nullable: true
                  description: Link to the team that owns the view
                  example: https://yourCompany.api.frontapp.com/teams/tim_xyz
        id:
          type: string
          description: Unique identifier of the shared view
          example: lns_abc123
        name:
          type: string
          description: Name of the shared view
          example: High Priority Support
        highlight:
          type: string
          nullable: true
          description: Color highlight for the view
          example: pink
        inbox_ids:
          type: array
          items:
            type: string
          description: List of inbox IDs included in the view
        tag_ids:
          type: array
          items:
            type: string
          description: List of tag IDs to filter by
        not_tag_ids:
          type: array
          items:
            type: string
          description: List of tag IDs to exclude
        no_tags:
          type: boolean
          description: Whether to filter for conversations without tags
        assignee_ids:
          type: array
          items:
            type: string
          description: List of assignee IDs to filter by
        not_assignee_ids:
          type: array
          items:
            type: string
          description: List of assignee IDs to exclude
    ResourceID:
      type: string
    UpdateView:
      properties:
        name:
          type: string
          description: Name of the view
        inbox_ids:
          type: array
          description: List of inbox IDs to filter by
          items:
            $ref: '#/components/schemas/ResourceID'
        tag_ids:
          type: array
          description: List of tag IDs to filter by
          items:
            $ref: '#/components/schemas/ResourceID'
        not_tag_ids:
          type: array
          description: List of tag IDs to exclude
          items:
            $ref: '#/components/schemas/ResourceID'
        no_tags:
          type: boolean
          description: Whether to filter for conversations without tags
        assignee_ids:
          type: array
          description: List of assignee IDs to filter by
          items:
            $ref: '#/components/schemas/ResourceID'
        not_assignee_ids:
          type: array
          description: List of assignee IDs to exclude
          items:
            $ref: '#/components/schemas/ResourceID'
        highlight:
          type: string
          description: Color highlight for the view
    CreateView:
      properties:
        name:
          type: string
          description: Name of the view
        inbox_ids:
          type: array
          description: List of inbox IDs to filter by
          items:
            $ref: '#/components/schemas/ResourceID'
        tag_ids:
          type: array
          description: List of tag IDs to filter by
          items:
            $ref: '#/components/schemas/ResourceID'
        not_tag_ids:
          type: array
          description: List of tag IDs to exclude
          items:
            $ref: '#/components/schemas/ResourceID'
        no_tags:
          type: boolean
          description: Whether to filter for conversations without tags
        assignee_ids:
          type: array
          description: List of assignee IDs to filter by
          items:
            $ref: '#/components/schemas/ResourceID'
        not_assignee_ids:
          type: array
          description: List of assignee IDs to exclude
          items:
            $ref: '#/components/schemas/ResourceID'
        highlight:
          type: string
          description: Color highlight for the view
      required:
      - name
      - inbox_ids
  responses:
    listOfViews:
      description: Array of views
      content:
        application/json:
          schema:
            type: object
            properties:
              _pagination:
                type: object
                properties:
                  next:
                    type: string
                    nullable: true
                    description: Link to next [page of results](https://dev.frontapp.com/docs/pagination)
                    example: https://yourCompany.api.frontapp.com/views?page_token=ce787da6f075740cf187d926f5e9f612bc7875763a8dd37d5
              _links:
                type: object
                properties:
                  self:
                    type: string
                    description: Link to resource
                    example: https://yourCompany.api.frontapp.com/views
              _results:
                type: array
                items:
                  $ref: '#/components/schemas/SharedViewResponse'
    view:
      description: A view
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/SharedViewResponse'
  parameters:
    limit:
      name: limit
      in: query
      description: Max number of results per [page](https://dev.frontapp.com/docs/pagination)
      schema:
        type: integer
        maximum: 100
        example: 25
    pageToken:
      name: page_token
      in: query
      description: Token to use to request the [next page](https://dev.frontapp.com/docs/pagination)
      schema:
        type: string
        example: https://yourCompany.api.frontapp.com/endpoint?limit=25&page_token=92f32bcd7625333caf4e0f8fc26d920c812f
  securitySchemes:
    http:
      type: http
      scheme: bearer
      bearerFormat: JWT
x-api-id: front
x-explorer-enabled: false
x-proxy-enabled: true
x-samples-enabled: true