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

# Create a session



## OpenAPI

````yaml /openapi.yaml post /session
openapi: 3.1.0
info:
  title: Pixwel Platform
  description: >-
    The Pixwel Platform REST API. Authenticate with HTTP Basic (email +
    password) or a personal access token (`Authorization: Bearer pat_…`).
    Responses are decorated by proxy middleware (Fields, Links, Permissions,
    etc.). Use `?fields=` to request specific fields.
  version: '2.8'
  contact:
    email: jeff@pixwel.com
  license:
    name: UNLICENSED
    identifier: LicenseRef-Pixwel-Proprietary
servers:
  - url: https://api-staging.pixwel.com/api
    description: Staging
  - url: https://app.pixwel.com/api
    description: Production
security:
  - BasicAuth: []
  - BearerAuth: []
paths:
  /session:
    post:
      tags:
        - Session
      summary: Create a session
      operationId: createSession
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SessionResponse'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SessionResponse'
        '401':
          description: Not authenticated
components:
  schemas:
    SessionResponse:
      type: object
      properties:
        _id:
          type: string
          example: 507f1f77bcf86cd799439011
        emailNormal:
          type: string
          format: email
          example: user@example.com
        invite:
          type: string
          format: uri
          example: https://example.com/path/to/object
        name:
          type: string
        password:
          type: string
        preferences:
          type: object
          properties:
            blacklist:
              type: object
              properties:
                projects:
                  description: Shape not inferred — the sampled response had no entries
            mail:
              type: object
              properties:
                enabled:
                  type: boolean
                projects:
                  type: integer
                assets:
                  type: integer
                files:
                  type: integer
                work_requests:
                  type: integer
                shares:
                  type: integer
                ingest:
                  type: integer
                offline_comments:
                  type: integer
                others:
                  type: integer
                work_request_comments:
                  type: integer
                workflow:
                  type: integer
                work_request_graphics_materials:
                  type: integer
                work_request_graphics_materials_comments:
                  type: integer
            ingest:
              type: object
              properties:
                skipScratchPreview:
                  type: boolean
                maxUploads:
                  type: integer
            contactLists:
              description: Shape not inferred — the sampled response had no entries
            reports:
              type: object
              properties:
                workRequests:
                  type: object
                  properties:
                    presets:
                      type: array
                      items:
                        type: object
                        properties:
                          name:
                            type: string
                          columns:
                            type: array
                            items:
                              type: string
                          active:
                            type: boolean
        queue:
          description: Shape not inferred — the sampled response had no entries
        status:
          type: object
          properties:
            invited:
              type: boolean
            approved:
              type: boolean
            registered:
              type: boolean
            confirmed:
              type: boolean
        territory:
          type: object
          properties:
            _id:
              type: string
              example: 507f1f77bcf86cd799439011
            name:
              type: string
            code:
              type: string
            standard:
              type: string
            countries:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  code:
                    type: string
            languages:
              type: array
              items:
                type: object
                properties:
                  name:
                    type: string
                  code:
                    type: string
                  dcpCode:
                    type: string
            assignedLanguages:
              type: array
              items:
                type: string
                example: 507f1f77bcf86cd799439011
        username:
          type: string
          format: email
          example: user@example.com
        orderQueue:
          description: Shape not inferred — the sampled response had no entries
        shareQueue:
          type: array
          items:
            type: string
            example: 507f1f77bcf86cd799439011
        id:
          type: string
          example: 507f1f77bcf86cd799439011
        flags:
          description: Shape not inferred — the sampled response had no entries
        twofactorVerified:
          type: boolean
        permissions:
          description: Shape not inferred — the sampled response had no entries
        groups:
          type: array
          items:
            type: object
            properties:
              _id:
                type: string
                example: 507f1f77bcf86cd799439011
              addresses:
                type: array
                items:
                  type: object
                  properties:
                    name:
                      type: string
                    address:
                      type: string
                    city:
                      type: string
                    state:
                      type: string
                    postalCode:
                      type: string
                    country:
                      type: string
              name:
                type: string
              studios:
                description: Shape not inferred — the sampled response had no entries
              type:
                type: string
              users:
                type: array
                items:
                  type: string
                  example: 507f1f77bcf86cd799439011
        roles:
          type: array
          items:
            type: string
        studios:
          description: Shape not inferred — the sampled response had no entries
        $links:
          type: object
          properties:
            self:
              type: string
              format: uri-reference
              example: //example.com/path/to/object
        hasEnforced2fa:
          type: boolean
  securitySchemes:
    BasicAuth:
      type: http
      scheme: basic
      description: >-
        Email address and password. A personal access token (`pat_…`) or session
        token (`token-…`) may also be sent in the password field, with any
        non-empty value as the username — a blank username short-circuits to a
        401 before the token is read.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: pat_<64 hex characters>
      description: >-
        A personal access token: `Authorization: Bearer pat_…`. Create one under
        Preferences → API Tokens, or with `POST /personal-access-tokens`. The
        token acts as its owner, with their full permissions.

````