Unblocked Collections API

A collection in Unblocked allows you to organize related documents from various data sources, such as customer support tools, knowledge bases, and internal wikis, which are not natively supported by Unblocked. You can create multiple collections to manage documents from different sources. You have the ability to list, create, update, and delete them as needed. Deleting a collection will also remove all the associated documents.

OpenAPI Specification

unblocked-collections-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  contact:
    email: help@getunblocked.com
    name: Unblocked
  description: "The Unblocked Public API offers seamless collection for managing custom data sources through a structured set of endpoints.\nIt allows users to create collections and organize and upload documents.\n\n# Base URL\nThe base URL for all requests is:\n\n```jsx\nhttps://getunblocked.com/api/v1\n```\n\n# Authentication\nAuthentication requires an API key, obtainable from the web dashboard,\nwhich must be included in the `Authorization` request header for all endpoints.\n\n```bash\ncurl -X GET https://getunblocked.com/api/v1/collections \\\n     -H \"Authorization: Bearer YOUR_API_KEY\"\n```\n\n# Rate Limits & Quotas\n\n**Resource Limits:**\n- Collections: Maximum 25 per team\n- Request Size: Maximum 10MB per request\n- Pagination: 1-200 items per page (default: 25)\n\n**Answers API:**\n- Daily Limit: 1000 questions per day per organization\n- Quota Reset: Midnight PST\n- Exceeding the limit returns a 429 Too Many Requests error\n\n**Field Constraints:**\n- Collection name: 1-32 characters\n- Collection description: 1-4096 characters\n"
  title: Unblocked Public API Reference Answers Collections API
  version: v1
  x-logo:
    url: https://avatars.githubusercontent.com/u/91906527?s=300
    altText: Unblocked
servers:
- url: https://getunblocked.com/api/v1
security:
- ApiKeyBearerAuth: []
tags:
- description: 'A collection in Unblocked allows you to organize related documents from various data sources, such as customer support tools, knowledge bases, and internal wikis, which are not natively supported by Unblocked.


    You can create multiple collections to manage documents from different sources.


    You have the ability to list, create, update, and delete them as needed.


    Deleting a collection will also remove all the associated documents.

    '
  name: Collections
paths:
  /collections:
    get:
      description: 'List all collections.

        '
      operationId: listCollections
      parameters:
      - description: 'Limit used to constrain results of list operations. When not specified a default limit of 25 is used.


          A maximum limit is applied to the results, so the server may respond with fewer results than requested; clients must not use this as a signal that this is the final page of results.

          '
        in: query
        name: limit
        required: false
        schema:
          format: int32
          maximum: 200
          minimum: 1
          type: integer
      - in: query
        name: after
        required: false
        schema:
          $ref: '#/components/schemas/Cursor'
      - in: query
        name: before
        required: false
        schema:
          $ref: '#/components/schemas/Cursor'
      responses:
        '200':
          content:
            application/json:
              schema:
                items:
                  $ref: '#/components/schemas/Collection'
                type: array
          description: OK
          headers:
            link:
              $ref: '#/components/headers/Link'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
      summary: List Collections
      tags:
      - Collections
    post:
      description: 'Create a collection. Teams are limited to 25 collections.


        **Field Constraints:**

        - Collection name: 1-32 characters

        - Collection description: 1-4096 characters

        '
      operationId: createCollection
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionRequest'
        required: true
      responses:
        '201':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
          description: Created
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
      summary: Create Collection
      tags:
      - Collections
  /collections/{collectionId}:
    delete:
      description: 'Delete a collection.


        Deleting a collection will also delete all of its associated documents.

        '
      operationId: deleteCollection
      parameters:
      - in: path
        name: collectionId
        required: true
        schema:
          description: The ID of the collection.
          format: uuid
          type: string
      responses:
        '204':
          description: No Content
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
      summary: Delete Collection
      tags:
      - Collections
    get:
      description: 'Get a collection.

        '
      operationId: getCollection
      parameters:
      - in: path
        name: collectionId
        required: true
        schema:
          description: The ID of the collection.
          format: uuid
          type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Collection'
          description: OK
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
      summary: Get Collection
      tags:
      - Collections
    patch:
      description: 'Update a collection.

        '
      operationId: saveCollection
      parameters:
      - in: path
        name: collectionId
        required: true
        schema:
          description: The ID of the collection.
          format: uuid
          type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CollectionRequest'
        required: true
      responses:
        '200':
          description: OK
        '400':
          $ref: '#/components/responses/ErrorResponse'
        '401':
          $ref: '#/components/responses/ErrorResponse'
        '404':
          $ref: '#/components/responses/ErrorResponse'
        '500':
          $ref: '#/components/responses/ErrorResponse'
      summary: Update Collection
      tags:
      - Collections
components:
  schemas:
    Cursor:
      description: 'Opaque cursor to be used for paging in a forward or backward direction. Cursors are stateless and so they never expire.

        '
      maxLength: 10000
      minLength: 1
      type: string
    Collection:
      properties:
        id:
          description: 'The ID of the collection.

            '
          format: uuid
          type: string
        name:
          description: 'A brief identifier for the collection.

            '
          example: Apollo
          type: string
        description:
          description: 'A sentence defining the document type within this collection, aiding the language model in grasping the content''s essence.

            '
          example: Documents from the Apollo customer support tool including support responses.
          type: string
        iconUrl:
          description: 'A URL of a square image used to visually represent document references from the collection in the Unblocked UI. Preferred image formats are SVG, PNG, and JPG.

            '
          example: https://my.company.com/apollo/logo.svg
          type: string
      required:
      - id
      type: object
    CollectionRequest:
      properties:
        name:
          description: 'A brief identifier for the collection.

            '
          example: Apollo
          maximum: 32
          minimum: 1
          type: string
        description:
          description: 'A sentence defining the document type within this collection, aiding the language model in grasping the content''s essence.


            **Field Constraint:**

            - Collection description: 1-4096 characters

            '
          example: Documents from the Apollo customer support tool including support responses.
          maximum: 1024
          minimum: 1
          type: string
        iconUrl:
          description: 'A URL of a square image used to visually represent document references from the collection in the Unblocked UI. Preferred image formats are SVG, PNG, and JPG.

            '
          example: https://my.company.com/apollo/logo.svg
          type: string
      type: object
  responses:
    ErrorResponse:
      content:
        application/json:
          schema:
            properties:
              status:
                description: The HTTP status code
                example: 400
                type: integer
            required:
            - status
            type: object
      description: Error response
  headers:
    Link:
      description: 'A link header providing navigation links related to the response.

        '
      example: <https://api.example.com/some/resource>; rel="next"
      schema:
        type: string
  securitySchemes:
    ApiKeyBearerAuth:
      bearerFormat: Unblocked API Key
      description: The API key to authenticate requests. Obtainable from the web dashboard.
      scheme: bearer
      type: http
x-tagGroups:
- name: Resources
  tags:
  - Collections
  - Documents
  - Answers