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

# Search Workspace

> Search across workspace members, projects, domains, and links

Find a specific recording link, project, domain, or teammate inside a workspace by name. Use this endpoint to power typeahead pickers, quick-jump UIs, or any flow where a user types a few characters to locate a resource.

Pass the resource kind as `type` and the search text as `q`. Each type uses the matching strategy best suited for its data:

* `links` — Postgres full-text search with prefix matching, ranked by relevance
* `members` — case-insensitive match on member name
* `projects` — case-insensitive match on project title
* `domains` — case-insensitive match on domain URL

The response is a discriminated union keyed on `type`, so `data.type` tells you which shape `data.results` has.

## Errors

| Error code                       | Status | Description                                  |
| -------------------------------- | ------ | -------------------------------------------- |
| `WORKSPACE_NOT_FOUND`            | 404    | Workspace does not exist                     |
| `WORKSPACE_GONE`                 | 410    | Workspace has been deleted                   |
| `WORKSPACE_SEARCH_TERM_REQUIRED` | 400    | `q` is empty after trimming                  |
| `WORKSPACE_SEARCH_TYPE_INVALID`  | 400    | `type` is not one of the four allowed values |
| `WORKSPACE_SEARCH_UNAVAILABLE`   | 500    | Search backend is temporarily unavailable    |

Also returns [common authentication errors](/api/error-handling#authentication-errors).

## Related

<CardGroup cols={2}>
  <Card title="List Links" icon="link" href="/api/links/list-links">
    Paginate through all links in a workspace
  </Card>

  <Card title="List Projects" icon="folder" href="/api/projects/list-projects">
    Paginate through all projects in a workspace
  </Card>
</CardGroup>


## OpenAPI

````yaml GET /public/workspace/{workspaceId}/search
openapi: 3.1.1
info:
  title: Userplane Public API
  version: 1.0.0
  description: >-
    Programmatic access to Userplane workspaces, recordings, and links.
    Authenticate with a Bearer token using your API key (uspl_ prefix).
servers:
  - url: https://api.userplane.io/api/v1
    description: Production
security:
  - bearerAuth: []
paths:
  /public/workspace/{workspaceId}/search:
    get:
      tags:
        - Search
      summary: Search workspace
      description: Search across workspace members, projects, domains, and links
      operationId: search
      parameters:
        - name: workspaceId
          in: path
          required: true
          schema:
            type: string
            minLength: 1
        - name: q
          in: query
          required: true
          schema:
            type: string
            minLength: 1
            maxLength: 100
          allowEmptyValue: true
          allowReserved: true
        - name: type
          in: query
          required: true
          schema:
            type: string
            enum:
              - members
              - projects
              - domains
              - links
          allowEmptyValue: true
          allowReserved: true
        - name: limit
          in: query
          required: true
          schema:
            default: 5
            type: integer
            minimum: 1
            maximum: 20
          allowEmptyValue: true
          allowReserved: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                  data:
                    oneOf:
                      - type: object
                        properties:
                          type:
                            type: string
                            const: members
                          results:
                            type: array
                            items:
                              type: object
                              properties:
                                workspaceMemberId:
                                  type: string
                                  minLength: 1
                                memberName:
                                  type: string
                                memberEmail:
                                  type: string
                                  format: email
                                  pattern: >-
                                    ^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$
                                workspaceRole:
                                  type: string
                                  enum:
                                    - owner
                                    - admin
                                    - member
                              required:
                                - workspaceMemberId
                                - memberName
                                - memberEmail
                                - workspaceRole
                              additionalProperties: false
                        required:
                          - type
                          - results
                        additionalProperties: false
                      - type: object
                        properties:
                          type:
                            type: string
                            const: projects
                          results:
                            type: array
                            items:
                              type: object
                              properties:
                                projectId:
                                  type: string
                                  minLength: 1
                                projectTitle:
                                  type: string
                                isDefault:
                                  type: boolean
                                recordingRetentionDays:
                                  type: integer
                                  minimum: -9007199254740991
                                  maximum: 9007199254740991
                                createdAt: {}
                                updatedAt: {}
                              required:
                                - projectId
                                - projectTitle
                                - isDefault
                                - recordingRetentionDays
                                - createdAt
                                - updatedAt
                              additionalProperties: false
                        required:
                          - type
                          - results
                        additionalProperties: false
                      - type: object
                        properties:
                          type:
                            type: string
                            const: domains
                          results:
                            type: array
                            items:
                              type: object
                              properties:
                                domainId:
                                  type: string
                                  minLength: 1
                                domainUrl:
                                  type: string
                                domainStatus:
                                  type: string
                                  enum:
                                    - pending
                                    - verified
                                    - revoked
                                createdAt: {}
                                updatedAt: {}
                              required:
                                - domainId
                                - domainUrl
                                - domainStatus
                                - createdAt
                                - updatedAt
                              additionalProperties: false
                        required:
                          - type
                          - results
                        additionalProperties: false
                      - type: object
                        properties:
                          type:
                            type: string
                            const: links
                          results:
                            type: array
                            items:
                              type: object
                              properties:
                                linkId:
                                  type: string
                                  minLength: 1
                                linkTitle:
                                  anyOf:
                                    - type: string
                                    - type: 'null'
                                linkType:
                                  type: string
                                  enum:
                                    - file
                                    - recording
                                    - session
                                    - screenshot
                                createdAt: {}
                                projectId:
                                  type: string
                                  minLength: 1
                                projectTitle:
                                  type: string
                                domainId:
                                  type: string
                                  minLength: 1
                                domainUrl:
                                  type: string
                              required:
                                - linkId
                                - linkTitle
                                - linkType
                                - createdAt
                                - projectId
                                - projectTitle
                                - domainId
                                - domainUrl
                              additionalProperties: false
                        required:
                          - type
                          - results
                        additionalProperties: false
                required:
                  - message
                  - data
                additionalProperties: false
        '400':
          description: '400'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: BAD_REQUEST
                      status:
                        const: 400
                      message:
                        type: string
                        default: >-
                          Invalid request parameters. Check the request body and
                          query parameters. See
                          https://docs.userplane.io/api/error-handling
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: WORKSPACE_SEARCH_TERM_REQUIRED
                      status:
                        const: 400
                      message:
                        type: string
                        default: Search term is required
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: WORKSPACE_SEARCH_TYPE_INVALID
                      status:
                        const: 400
                      message:
                        type: string
                        default: Invalid search type
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '401':
          description: '401'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: API_KEY_REQUIRED
                      status:
                        const: 401
                      message:
                        type: string
                        default: >-
                          API key is required. Include it as Authorization:
                          Bearer <your-api-key>. See
                          https://docs.userplane.io/api/authentication
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: API_KEY_INVALID
                      status:
                        const: 401
                      message:
                        type: string
                        default: >-
                          The provided API key is not valid. Verify the key and
                          try again. See
                          https://docs.userplane.io/api/authentication
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: API_KEY_EXPIRED
                      status:
                        const: 401
                      message:
                        type: string
                        default: >-
                          The API key has expired. Rotate or create a new key.
                          See https://docs.userplane.io/api/authentication
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '403':
          description: '403'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: API_KEY_DISABLED
                      status:
                        const: 403
                      message:
                        type: string
                        default: >-
                          The API key is disabled. Enable it or create a new
                          key. See https://docs.userplane.io/api/authentication
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: NOT_A_MEMBER
                      status:
                        const: 403
                      message:
                        type: string
                        default: >-
                          The API key owner is not a member of this workspace.
                          See https://docs.userplane.io/api/error-handling
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '404':
          description: '404'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: WORKSPACE_NOT_FOUND
                      status:
                        const: 404
                      message:
                        type: string
                        default: Workspace not found
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '410':
          description: '410'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: WORKSPACE_GONE
                      status:
                        const: 410
                      message:
                        type: string
                        default: Workspace has been deleted
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '429':
          description: '429'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: RATE_LIMITED
                      status:
                        const: 429
                      message:
                        type: string
                        default: >-
                          Rate limit exceeded. Wait and retry with exponential
                          backoff. See https://docs.userplane.io/api/rate-limits
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '500':
          description: '500'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: WORKSPACE_SEARCH_UNAVAILABLE
                      status:
                        const: 500
                      message:
                        type: string
                        default: Search is not available for this resource type
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
        '503':
          description: '503'
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    properties:
                      defined:
                        const: true
                      code:
                        const: SERVICE_UNAVAILABLE
                      status:
                        const: 503
                      message:
                        type: string
                        default: >-
                          API key verification service is temporarily
                          unavailable. Please try again later. See
                          https://docs.userplane.io/api/error-handling
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
                  - type: object
                    properties:
                      defined:
                        const: false
                      code:
                        type: string
                      status:
                        type: number
                      message:
                        type: string
                      data: {}
                    required:
                      - defined
                      - code
                      - status
                      - message
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        API key with uspl_ prefix. Create keys at
        dash.userplane.io/_/account?tab=developers

````