> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anny.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a view

> Create a private (`owner_type=users`) or shared (`owner_type=organizations`) View.

Notes:
- `owner_id` is derived server-side from the current user or organization.
- If `filters` or `columns` are omitted, defaults for the selected `area` are applied.
- The creator is granted entity-scoped `*` permission for this View.




## OpenAPI

````yaml /developers/openapi/admin-internal.openapi.json post /api/v1/views
openapi: 3.1.0
info:
  title: admin-api
  version: '1.0'
  description: >-
    The Admin API gives you **full programmatic access** to your anny
    organization. It is built for **server-side integrations** — backend
    services, automation scripts, and custom tooling that act on behalf of your
    team.


    ---


    ## When to use the Admin API


    Use the Admin API when you need to **drive workflows from your own
    systems**:


    - **Sync membership data** — create or update customers, assign them to
    communities, reflect subscription status from an external CRM

    - **Create bookings programmatically** — build back-office tools or automate
    repeat reservations without going through the customer checkout

    - **Issue and forward invoices** — generate invoices, send them to
    customers, or push them to your accounting system

    - **React to real-time events** — pair the API with
    [Webhooks](/developers/guides/admin/webhooks) to trigger side effects
    whenever a booking is created, cancelled, or checked in

    - **Drive display panels** — push live occupancy and schedule data to
    digital signage or lobby displays


    Combined with [webhook subscriptions](/developers/guides/admin/webhooks),
    you can build fully automated, event-driven workflows without polling.


    ---


    ## Authentication


    Generate a long-lived API token directly in the admin dashboard under
    **Organization Settings → API**. All requests require it in the
    `Authorization` header:


    ```

    Authorization: Bearer {access_token}

    ```


    Every endpoint is **organization-scoped**. Pass your organization ID as a
    query parameter on every request:


    ```

    ?o={organization_id}

    ```


    See the [Authentication guide](/developers/guides/authentication) for token
    scopes and the full OAuth2 flow.


    ---


    ## Admin API vs Customer API


    | | Admin API | Customer API |

    |---|---|---|

    | **Use case** | Server-side automation, backend tooling | End-user apps,
    booking widgets |

    | **Auth** | Required — API token or OAuth2 | Optional — many endpoints work
    without a token |

    | **Identifiers** | Immutable UUIDs and integer IDs | Slugs, booking
    numbers, order numbers |

    | **Access** | Full read/write | Public and customer-owned data only |


    → [Go to the Customer API](/developers/api-reference/customer)


    ---


    ## Resource Identifiers


    The Admin API uses **immutable IDs** — UUIDs for most entities, integers for
    legacy ones. These are safe to store in external systems and never change,
    even if an organization renames a resource.


    ---


    ## Starting Points


    | Guide | What it covers |

    |---|---|

    | [Getting Started](/developers) | First steps and quickstart |

    | [JSON:API Conventions](/developers/guides/json-api-conventions) | Request
    and response format |

    | [Authentication](/developers/guides/authentication) | API tokens, OAuth2,
    scopes |

    | [Availability & Booking Search](/developers/guides/availability) | Search
    open slots and timeslots |

    | [Admin Booking Creation](/developers/guides/admin/booking-creation) |
    Create bookings from the back office |

    | [Admin Booking Edit](/developers/guides/admin/booking-edit) | Edit
    resource, dates, fields, add-ons, and sub-bookings |

    | [Admin Booking Lifecycle](/developers/guides/admin/booking-lifecycle) |
    Status changes, check-in, cancellations |

    | [Invoices](/developers/guides/admin/invoices) | Create, send, and manage
    invoices |

    | [Customer Management](/developers/guides/admin/customer-management) |
    Create and manage customer records |

    | [Booking Calendars](/developers/guides/admin/calendar-events) | Custom
    calendar events |

    | [Timeslot Management](/developers/guides/admin/timeslot-management) |
    Manage timeslot CRUD, recurrence, allocations, and rescheduling |

    | [Broadcast Campaigns](/developers/guides/admin/broadcasting) | Email and
    push campaigns |

    | [Exports](/developers/guides/admin/exports) | Export bookings and customer
    data |

    | [Webhooks & Events](/developers/guides/admin/webhooks) | Subscribe to
    real-time events |


    ---


    ## Base URLs


    | Environment | URL |

    |---|---|

    | Production | `https://b.anny.co` |

    | Gov-Cloud | `https://b.anny.eu` |
  contact:
    name: anny GmbH
    url: https://anny.co
    email: support@anny.co
servers:
  - url: https://b.anny.co
    description: Production
  - url: https://b.anny.eu
    description: Gov-Cloud
security:
  - Bearer: []
tags:
  - name: Booking Quotas
  - name: Orders
  - name: Organizations
  - name: Table Configuration
  - name: Test-Results
  - name: User Settings
  - name: Terminal Locations
  - name: Terminal Readers
  - name: Connection Tokens
  - name: Views
  - name: Voice Integration
paths:
  /api/v1/views:
    post:
      tags:
        - Views
      summary: Create a view
      description: >
        Create a private (`owner_type=users`) or shared
        (`owner_type=organizations`) View.


        Notes:

        - `owner_id` is derived server-side from the current user or
        organization.

        - If `filters` or `columns` are omitted, defaults for the selected
        `area` are applied.

        - The creator is granted entity-scoped `*` permission for this View.
      operationId: post-internal-views
      parameters:
        - schema:
            type: string
          in: header
          name: Authorization
          description: Bearer Token
          required: true
        - schema:
            type: string
          in: query
          name: o
          description: Organization ID
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              type: object
              required:
                - data
              properties:
                data:
                  type: object
                  required:
                    - type
                    - attributes
                  properties:
                    type:
                      type: string
                      enum:
                        - views
                    attributes:
                      type: object
                      required:
                        - name
                        - area
                        - owner_type
                      properties:
                        name:
                          type: string
                          maxLength: 255
                        area:
                          type: string
                          enum:
                            - bookings
                            - orders
                            - customers
                            - resources
                            - invoices
                            - queue-ticket-bookings
                            - plan-subscriptions
                            - booking-passes
                            - calendar
                        owner_type:
                          type: string
                          enum:
                            - users
                            - organizations
                        filters:
                          type:
                            - object
                            - 'null'
                        columns:
                          type:
                            - array
                            - 'null'
                          items:
                            type: string
                        config:
                          type:
                            - object
                            - 'null'
            examples:
              private-view:
                value:
                  data:
                    type: views
                    attributes:
                      name: Team Bookings
                      area: bookings
                      owner_type: users
                      filters:
                        upcomingOnly: true
                        status: []
              shared-view:
                value:
                  data:
                    type: views
                    attributes:
                      name: Front Desk Calendar
                      area: calendar
                      owner_type: organizations
                      config:
                        resources: []
                        view: resourceTimeGridDay
                        slotHeight: 18
                        showBookingPaddings: false
                        slotDuration: '00:15:00'
      responses:
        '201':
          description: Created
          content:
            application/vnd.api+json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/views.v1'
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '422':
          description: Validation error
      security:
        - Bearer: []
components:
  schemas:
    views.v1:
      $schema: https://json-schema.org/draft/2020-12/schema
      x-version: 1.0.0
      title: View
      type: object
      description: Saved table/filter/display preset for an admin area.
      x-tags:
        - Models
      properties:
        id:
          type: string
          format: uuid
        type:
          type: string
          default: views
        attributes:
          type: object
          properties:
            name:
              type: string
              description: Human-readable view name.
            area:
              type: string
              description: Area this view applies to.
              enum:
                - bookings
                - orders
                - customers
                - resources
                - invoices
                - queue-ticket-bookings
                - plan-subscriptions
                - booking-passes
                - calendar
            filters:
              type:
                - object
                - 'null'
              description: Area-specific filter state.
            columns:
              type:
                - array
                - 'null'
              description: Ordered table column keys.
              items:
                type: string
            config:
              type:
                - object
                - 'null'
              description: Area-specific display configuration.
            owner_type:
              type: string
              enum:
                - users
                - organizations
              description: Owner polymorphic type.
            owner_id:
              oneOf:
                - type: string
                - type: integer
              description: Owner identifier.
            created_at:
              type: string
              format: date-time
            updated_at:
              type: string
              format: date-time
        meta:
          type: object
          properties:
            is_shared:
              type: boolean
              description: True when owned by the organization.
        links:
          $ref: '#/components/schemas/links.v1'
        relationships:
          type: object
          properties:
            organization:
              type: object
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    id:
                      type: string
                    type:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            owner:
              type: object
              description: Polymorphic owner relation (`users` or `organizations`).
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    id:
                      type: string
                    type:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
            last_edited_by:
              type: object
              properties:
                data:
                  type:
                    - object
                    - 'null'
                  properties:
                    id:
                      type: string
                    type:
                      type: string
                links:
                  $ref: '#/components/schemas/links.v1'
    links.v1:
      $schema: https://json-schema.org/draft/2020-12/schema
      x-version: 1.1.0
      title: ResourceLinks
      x-tags:
        - Models
      type: object
      description: JSON:API self-link object
      properties:
        self:
          type: string
          format: uri
  securitySchemes:
    Bearer:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://auth.anny.co/oauth/authorize
          tokenUrl: https://auth.anny.co/oauth/token
          refreshUrl: https://auth.anny.co/oauth/token/refresh
          scopes: {}

````