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

# Get workspace details

> Returns a consolidated, read-only summary of a partner-managed workspace. The payload includes basic workspace identity (workspace_id, display_name), seat allocation and utilization, messaging and API quotas, any non-recurring quota balance, the list of users in the workspace, WhatsApp accounts associated with the workspace, and currently active QR-code links. Only workspaces that are owned by the calling partner and are not -billing managed are eligible. If the workspace does not exist or is not linked to the partner, a 404 error is returned.



## OpenAPI

````yaml get /workspaces/{workspace_id}
openapi: 3.0.3
info:
  title: Partner API
  version: 1.0.1
  description: >-
    Partner-facing HTTP API used by approved integrators to provision and manage
    TimelinesAI workspaces, users and WhatsApp connections on behalf of their
    customers. All endpoints are versioned under /partner/api/v1 and secured
    with JWT bearer authentication. Obtaining a workspace Public API token,
    together with the capabilities of the Public API such as webhook
    subscriptions, enables partners to build complex integrations for their
    customers.
servers:
  - url: /partner/api/v1
    description: Partner API root URL
security:
  - bearerAuth: []
tags:
  - name: workspaces
  - name: users
  - name: whatsappAccounts
  - name: qr
  - name: publicAPI
paths:
  /workspaces/{workspace_id}:
    get:
      tags:
        - workspaces
      summary: Get workspace details
      description: >-
        Returns a consolidated, read-only summary of a partner-managed
        workspace. The payload includes basic workspace identity (workspace_id,
        display_name), seat allocation and utilization, messaging and API
        quotas, any non-recurring quota balance, the list of users in the
        workspace, WhatsApp accounts associated with the workspace, and
        currently active QR-code links. Only workspaces that are owned by the
        calling partner and are not -billing managed are eligible. If the
        workspace does not exist or is not linked to the partner, a 404 error is
        returned.
      operationId: workspaceGet
      parameters:
        - $ref: '#/components/parameters/X-TL-Partner-Id'
        - name: workspace_id
          in: path
          required: true
          description: The unique identifier for the workspace.
          schema:
            type: string
      responses:
        '200':
          headers:
            X-TL-API-Version:
              schema:
                type: string
              description: Partner API version. Current version is v1
          description: Workspace details
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PartnerAPIWorkspaceExtendedResponse'
        '404':
          $ref: '#/components/responses/WorkspaceNotFound'
components:
  parameters:
    X-TL-Partner-Id:
      name: X-TL-Partner-Id
      in: header
      description: The unique identifier for the partner.
      required: true
      schema:
        type: string
  schemas:
    PartnerAPIWorkspaceExtendedResponse:
      type: object
      properties:
        workspace_id:
          type: string
          description: Unique identifier for the workspace
          example: ws_1234567890abcdef
        display_name:
          type: string
          description: Workspace display name
          example: my-first-workspace
        seats:
          $ref: '#/components/schemas/PartnerAPIQuota'
        messages_quota:
          $ref: '#/components/schemas/PartnerAPIQuota'
        api_calls_quota:
          $ref: '#/components/schemas/PartnerAPIQuota'
        whatsapp_accounts:
          type: array
          items:
            $ref: '#/components/schemas/PartnerAPIWhatsappAccount'
        non_recurring_quota:
          $ref: '#/components/schemas/PartnerAPINonRecurringQuota'
        users:
          type: array
          items:
            $ref: '#/components/schemas/PartnerAPIUser'
        qr_links:
          type: array
          items:
            $ref: '#/components/schemas/PartnerAPIQRCodeLink'
      required:
        - workspace_id
        - display_name
        - seats
        - messages_quota
        - api_calls_quota
        - non_recurring_quota
        - users
      description: >-
        Detailed summary of a partner-managed workspace. Combines core workspace
        identity with seat usage, messaging and Public API quotas, non-recurring
        quota balances, the list of users, WhatsApp accounts associated with the
        workspace, and active QR links. Used by partners to monitor utilization
        and operational health of a workspace in a single call.
    PartnerAPIQuota:
      type: object
      description: Workspace quota details
      properties:
        total:
          type: integer
          description: Total number of seats in the workspace
          example: 10
        used:
          type: integer
          description: Number of used seats in the workspace
          example: 7
        period_start:
          type: string
          format: date-time
          description: Start date of the quota period
          example: '2024-01-01T00:00:00Z'
        period_end:
          type: string
          format: date-time
          description: End date of the quota period
          example: '2024-12-31T23:59:59Z'
      required:
        - total
        - used
    PartnerAPIWhatsappAccount:
      type: object
      description: WhatsApp account details
      properties:
        user_id:
          type: integer
          description: User ID associated with the WhatsApp account
          example: wa_abcdef123456
        connected:
          type: boolean
          description: Current status of the WhatsApp account
          example: true
        whatsapp_account_id:
          type: integer
          description: ID of the WhatsApp account
          example: 987654321
        phone_number_e164:
          type: string
          description: Phone number associated with the WhatsApp account
          example: '+1234567890'
        connection_status:
          type: string
          description: Connection status of the WhatsApp account
          example: connected
        connected_at:
          type: string
          format: date-time
          description: Timestamp when the WhatsApp account was connected
          example: '2024-01-15T10:00:00Z'
      required:
        - connected
        - whatsapp_account_id
        - phone_number_e164
        - connection_status
    PartnerAPINonRecurringQuota:
      type: object
      properties:
        remaining_balance:
          type: integer
          description: Remaining balance of non-recurring quota
          example: 50
        last_updated_at:
          type: string
          format: date-time
          description: Timestamp of the last recharge
          example: '2024-01-10T12:00:00Z'
      description: >-
        Non-recurring quota information for a workspace. Represents an
        additional, non-recurring balance (for example, one-off purchased
        message packs) with the remaining_balance and the timestamp when it was
        last updated.
    PartnerAPIUser:
      type: object
      properties:
        user_id:
          type: integer
          description: Unique identifier for the user
          example: 42
        display_name:
          type: string
          description: Display name of the user
          example: John Doe
        role:
          type: string
          description: Role of the user in the workspace
          example: owner
        email:
          type: string
          description: Email address of the user
          example: admin@timelines.ai
        status:
          type: string
          description: Status of the user
          example: active
        created_at:
          type: string
          format: date-time
          description: Timestamp of user creation
          example: '2024-01-01T10:00:00Z'
      required:
        - user_id
        - display_name
        - email
        - status
        - created_at
      description: >-
        User entry returned as part of a workspace summary or bulk user creation
        response. Captures the user identifier, display name, email, role within
        the workspace and current status, together with the creation timestamp.
        Partner-created placeholders follow the partners.timelines.ai email
        pattern and typically have agent role and activated status.
    PartnerAPIQRCodeLink:
      type: object
      properties:
        qr_link:
          type: string
          description: QR code link for connecting to WhatsApp
          example: https://timelines.ai/qr/abcdef123456
        user_id:
          type: integer
          description: ID of the user associated with the QR code link
          example: 42
        expires_at:
          type: string
          format: date-time
          description: Expiration timestamp of the QR code link
          example: '2024-01-02T10:00:00Z'
      required:
        - qr_link
        - user_id
        - expires_at
      description: >-
        Active QR-link record for a user in a partner-managed workspace.
        Includes the unguessable qr_link URL, the user_id it belongs to, and the
        expires_at timestamp after which the link can no longer be used to
        establish a WhatsApp connection.
    PartnerAPIError:
      type: object
      properties:
        error:
          type: string
          description: Machine-readable error code
        status:
          type: integer
          description: HTTP status code
        description:
          type: string
          description: Human-readable error description
      required:
        - error
        - status
      description: >-
        Standard error envelope used by Partner API endpoints. The error field
        contains a machine-readable error code such as partner_not_found,
        partner_not_active, invalid_signature, timestamp_out_of_range,
        workspace_not_found, workspace_not_owned_by_partner or
        workspace_billing_managed. The status field repeats the HTTP status
        code, and description may contain a human-readable explanation suitable
        for logs and troubleshooting.
  responses:
    WorkspaceNotFound:
      description: Workspace not found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/PartnerAPIError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT bearer authentication. The token payload must include partner_id,
        nbf (not-before) and exp (expiry) claims. All Partner API requests must
        be authenticated with Authorization: Bearer <token>.

````