SignalWire Documents API

Manage Datasphere documents.

Operations 6

GET /api/datasphere/documents List documents #
POST /api/datasphere/documents Create document #
POST /api/datasphere/documents/search Search documents #
GET /api/datasphere/documents/{id} Get document #
PATCH /api/datasphere/documents/{id} Update document #
DELETE /api/datasphere/documents/{id} Delete document #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/signalwire-documents-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

signalwire-documents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: SignalWire REST Documents API
  version: 1.0.0
  contact:
    name: SignalWire
    url: https://support.signalwire.com/portal/en/newticket?departmentId=1029313000000006907&layoutId=1029313000000074011
    email: support@signalwire.com
  license:
    name: MIT
    url: https://github.com/signalwire/docs/blob/main/LICENSE
  termsOfService: https://signalwire.com/legal/signalwire-cloud-agreement
  description: Manage Datasphere documents.
servers:
- url: https://{space_name}.signalwire.com
  description: SignalWire API
  variables:
    space_name:
      default: '{Your_Space_Name}'
      description: Your SignalWire Space name
security:
- SignalWireBasicAuth: []
tags:
- name: Documents
  description: Manage Datasphere documents.
  externalDocs:
    url: https://signalwire.com/docs/apis
    description: Developer documentation on SignalWire REST APIs
paths:
  /api/datasphere/documents:
    get:
      operationId: list_documents
      summary: List documents
      description: 'A list of Datasphere Documents.


        #### Permissions


        The API token used to authenticate must have the following scope(s) enabled to make a successful request: _DataSphere_.


        Learn more about API scopes.'
      parameters:
      - $ref: '#/components/parameters/Datasphere.DocumentListQuery.page_number'
      - $ref: '#/components/parameters/Datasphere.DocumentListQuery.page_size'
      - $ref: '#/components/parameters/Datasphere.DocumentListQuery.page_token'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datasphere.DocumentListResponse'
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode400'
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode401'
        '422':
          description: The request contains invalid parameters. See errors for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datasphere.ListStatusCode422'
        '500':
          description: An internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode500'
      tags:
      - Documents
    post:
      operationId: create_document
      summary: Create document
      description: 'Creates a Datasphere Document.


        #### Permissions


        The API token used to authenticate must have the following scope(s) enabled to make a successful request: _DataSphere_.


        Learn more about API scopes.'
      parameters: []
      responses:
        '201':
          description: The request has succeeded and a new resource has been created as a result.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datasphere.Document'
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode400'
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode401'
        '422':
          description: The request contains invalid parameters. See errors for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datasphere.CreateStatusCode422'
        '500':
          description: An internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode500'
      tags:
      - Documents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Datasphere.DocumentCreateRequest'
  /api/datasphere/documents/search:
    post:
      operationId: search_documents
      summary: Search documents
      description: 'Search Datasphere Documents.


        #### Permissions


        The API token used to authenticate must have the following scope(s) enabled to make a successful request: _DataSphere_.


        Learn more about API scopes.'
      parameters: []
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datasphere.SearchResponse'
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode400'
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode401'
        '422':
          description: The request contains invalid parameters. See errors for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datasphere.SearchStatusCode422'
        '500':
          description: An internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode500'
      tags:
      - Documents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Datasphere.DocumentSearchRequest'
  /api/datasphere/documents/{id}:
    get:
      operationId: get_document
      summary: Get document
      description: 'Retrieves a Datasphere Document by ID.


        #### Permissions


        The API token used to authenticate must have the following scope(s) enabled to make a successful request: _DataSphere_.


        Learn more about API scopes.'
      parameters:
      - $ref: '#/components/parameters/Datasphere.PathID'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datasphere.Document'
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode400'
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode401'
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode404'
        '500':
          description: An internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode500'
      tags:
      - Documents
    patch:
      operationId: update_document
      summary: Update document
      description: 'Updates a Datasphere Document by ID.


        #### Permissions


        The API token used to authenticate must have the following scope(s) enabled to make a successful request: _DataSphere_.


        Learn more about API scopes.'
      parameters:
      - $ref: '#/components/parameters/Datasphere.PathID'
      responses:
        '200':
          description: The request has succeeded.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datasphere.Document'
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode400'
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode401'
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode404'
        '422':
          description: The request contains invalid parameters. See errors for details.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Datasphere.UpdateStatusCode422'
        '500':
          description: An internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode500'
      tags:
      - Documents
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Datasphere.DocumentUpdateRequest'
    delete:
      operationId: delete_document
      summary: Delete document
      description: 'Deletes a Datasphere Document by ID.


        #### Permissions


        The API token used to authenticate must have the following scope(s) enabled to make a successful request: _DataSphere_.


        Learn more about API scopes.'
      parameters:
      - $ref: '#/components/parameters/Datasphere.PathID'
      responses:
        '204':
          description: 'There is no content to send for this request, but the headers may be useful. '
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode400'
        '401':
          description: Access is unauthorized.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode401'
        '404':
          description: The server cannot find the requested resource.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode404'
        '500':
          description: An internal server error occurred.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Types.StatusCodes.StatusCode500'
      tags:
      - Documents
components:
  schemas:
    Datasphere.DocumentCreatePageRequest:
      type: object
      properties:
        chunking_strategy:
          type: string
          enum:
          - page
          description: Strategy for chunking the document
          examples:
          - page
      unevaluatedProperties:
        not: {}
      allOf:
      - $ref: '#/components/schemas/Datasphere.DocumentCreateRequestBase'
      title: Page strategy
    Datasphere.DocumentUpdateRequest:
      type: object
      required:
      - tags
      properties:
        tags:
          type: array
          items:
            type: string
          description: Document tags.
          examples:
          - - sports
            - football
            - game
      unevaluatedProperties:
        not: {}
    Datasphere.DocumentCreateSlidingRequest:
      type: object
      properties:
        chunk_size:
          type: integer
          description: Number of words per chunk.
          examples:
          - 50
          default: 50
        chunking_strategy:
          type: string
          enum:
          - sliding
          description: Strategy for chunking the document
          examples:
          - sliding
        overlap_size:
          type: integer
          description: Amount of overlap between chunks, in number of words.
          examples:
          - 10
          default: 10
      unevaluatedProperties:
        not: {}
      allOf:
      - $ref: '#/components/schemas/Datasphere.DocumentCreateRequestBase'
      title: Sliding strategy
    Types.StatusCodes.StatusCode401:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          enum:
          - Unauthorized
      unevaluatedProperties:
        not: {}
      description: Access is unauthorized.
    Datasphere.DocumentStatus:
      type: string
      enum:
      - submitted
      - in_progress
      - completed
      - failed
      description: The current Status of the Document.
    Datasphere.DocumentCreateRequestBase:
      type: object
      required:
      - url
      properties:
        url:
          type: string
          format: uri
          description: URL of the document.
          examples:
          - https://example.com/document.pdf
        tags:
          type: array
          items:
            type: string
          description: Document tags.
          examples:
          - - sports
            - football
            - game
    Datasphere.UpdateStatusCode422:
      type: object
      required:
      - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Types.StatusCodes.RestApiErrorItem'
          description: List of validation errors.
      unevaluatedProperties:
        not: {}
      description: The request contains invalid parameters. See errors for details.
      examples:
      - statusCode: 422
        errors:
        - type: validation_error
          code: invalid_parameter
          message: Invalid tags
          attribute: tags
          url: https://signalwire.com/docs/apis/error-codes
    Types.StatusCodes.RestApiErrorItem:
      type: object
      required:
      - type
      - code
      - message
      - url
      properties:
        type:
          type: string
          description: The category of error.
          examples:
          - validation_error
        code:
          type: string
          description: A specific error code.
          examples:
          - invalid_parameter
        message:
          type: string
          description: A description of what caused the error.
          examples:
          - Name must be present
        attribute:
          anyOf:
          - type: string
          - type: 'null'
          description: The request parameter that caused the error, if applicable.
          examples:
          - name
        url:
          type: string
          description: A link to documentation about this error.
          examples:
          - https://signalwire.com/docs/apis/error-codes
      unevaluatedProperties:
        not: {}
      description: Details about a specific error.
    Datasphere.Document:
      type: object
      required:
      - id
      - filename
      - status
      - tags
      - chunking_strategy
      - max_sentences_per_chunk
      - split_newlines
      - overlap_size
      - chunk_size
      - number_of_chunks
      - chunks_uri
      - created_at
      - updated_at
      properties:
        id:
          allOf:
          - $ref: '#/components/schemas/uuid'
          description: Unique ID of the Document.
          examples:
          - acaa5c49-be5e-4477-bce0-48f4b23b7720
        filename:
          type: string
          description: Name of the Document.
          examples:
          - player_list.pdf
        status:
          allOf:
          - $ref: '#/components/schemas/Datasphere.DocumentStatus'
          description: Status of the Document.
          examples:
          - in_progress
        tags:
          type: array
          items:
            type: string
          description: Document tags.
          examples:
          - - sports
            - football
            - game
        chunking_strategy:
          allOf:
          - $ref: '#/components/schemas/Datasphere.ChunkingStrategy'
          description: Strategy used to chunk the document.
          examples:
          - sentence
        max_sentences_per_chunk:
          anyOf:
          - type: integer
          - type: 'null'
          description: Max Sentences per Chunk. Only present when chunking strategy is 'sentence', null otherwise.
          examples:
          - 80
        split_newlines:
          anyOf:
          - type: boolean
          - type: 'null'
          description: Split on Newlines. Only present when chunking strategy is 'sentence', null otherwise.
          examples:
          - true
        overlap_size:
          anyOf:
          - type: integer
          - type: 'null'
          description: Overlap Size. Only present when chunking strategy is 'sliding', null otherwise.
          examples:
          - 10
        chunk_size:
          anyOf:
          - type: integer
          - type: 'null'
          description: Chunk Size. Only present when chunking strategy is 'sliding', null otherwise.
          examples:
          - 50
        number_of_chunks:
          type: integer
          description: Number of Chunks in the Document.
          examples:
          - 2345
        chunks_uri:
          type: string
          description: URI path to the chunks for this document.
          examples:
          - /api/rest/datasphere/documents/acaa5c49-be5e-4477-bce0-48f4b23b7720/chunks
        created_at:
          type: string
          format: date-time
          description: Document Creation Date.
          examples:
          - 2024-05-06T12:20-12Z
        updated_at:
          type: string
          format: date-time
          description: Document Update Date.
          examples:
          - 2024-05-06T12:20-12Z
      unevaluatedProperties:
        not: {}
    Types.StatusCodes.StatusCode400:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          enum:
          - Bad Request
      unevaluatedProperties:
        not: {}
      description: The request is invalid.
    Datasphere.ChunkingStrategy:
      type: string
      enum:
      - sentence
      - paragraph
      - page
      - sliding
      description: Strategy to use when chunking the document.
    Datasphere.CreateStatusCode422:
      type: object
      required:
      - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Types.StatusCodes.RestApiErrorItem'
          description: List of validation errors.
      unevaluatedProperties:
        not: {}
      description: The request contains invalid parameters. See errors for details.
      examples:
      - statusCode: 422
        errors:
        - type: validation_error
          code: invalid_parameter
          message: Invalid chunking_strategy
          attribute: chunking_strategy
          url: https://signalwire.com/docs/apis/error-codes
    Types.StatusCodes.StatusCode404:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          enum:
          - Not Found
      unevaluatedProperties:
        not: {}
      description: The server cannot find the requested resource.
    Datasphere.DocumentCreateSentenceRequest:
      type: object
      properties:
        max_sentences_per_chunk:
          type: integer
          description: Maximum number of sentences per chunk.
          examples:
          - 40
          default: 50
        chunking_strategy:
          type: string
          enum:
          - sentence
          description: Strategy for chunking the document
          examples:
          - sentence
        split_newlines:
          type: boolean
          description: 'Whether to split chunks on new lines.




            **Default value:** `false`'
          examples:
          - false
          default: false
      unevaluatedProperties:
        not: {}
      allOf:
      - $ref: '#/components/schemas/Datasphere.DocumentCreateRequestBase'
      title: Sentence strategy
    Datasphere.ListStatusCode422:
      type: object
      required:
      - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Types.StatusCodes.RestApiErrorItem'
          description: List of validation errors.
      unevaluatedProperties:
        not: {}
      description: The request contains invalid parameters. See errors for details.
      examples:
      - statusCode: 422
        errors:
        - type: validation_error
          code: invalid_parameter
          message: Invalid page_token
          attribute: page_token
          url: https://signalwire.com/docs/apis/error-codes
    Datasphere.DocumentCreateParagraphRequest:
      type: object
      properties:
        chunking_strategy:
          type: string
          enum:
          - paragraph
          description: Strategy for chunking the document
          examples:
          - paragraph
      unevaluatedProperties:
        not: {}
      allOf:
      - $ref: '#/components/schemas/Datasphere.DocumentCreateRequestBase'
      title: Paragraph strategy
    Datasphere.DocumentCreateRequest:
      oneOf:
      - $ref: '#/components/schemas/Datasphere.DocumentCreateSentenceRequest'
      - $ref: '#/components/schemas/Datasphere.DocumentCreateSlidingRequest'
      - $ref: '#/components/schemas/Datasphere.DocumentCreatePageRequest'
      - $ref: '#/components/schemas/Datasphere.DocumentCreateParagraphRequest'
    Datasphere.DocumentListResponse:
      type: object
      required:
      - data
      - links
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/Datasphere.Document'
          description: A list of documents.
        links:
          allOf:
          - $ref: '#/components/schemas/Datasphere.PaginationResponse'
          description: Pagination links.
      unevaluatedProperties:
        not: {}
    Datasphere.DocumentSearchRequest:
      type: object
      required:
      - query_string
      properties:
        tags:
          type: array
          items:
            type: string
          description: Document tags.
          examples:
          - - sports
            - football
            - game
        document_id:
          allOf:
          - $ref: '#/components/schemas/uuid'
          description: Unique ID of a Document.
          examples:
          - acaa5c49-be5e-4477-bce0-48f4b23b7720
        query_string:
          type: string
          description: Search term.
          examples:
          - Most paid athlete
        distance:
          type: number
          minimum: 0
          maximum: 78.3836717690617
          description: Specifies how closely related the query is to the document. Low distance means high relevance and similarity. High distance means low relevance and similarity.
          examples:
          - 2
        count:
          type: integer
          minimum: 1
          description: Specifies number of returned Chunks.
          examples:
          - 5
          default: 5
        language:
          type: string
          description: Language of the Document.
          examples:
          - fr
          default: en
        pos_to_expand:
          type: array
          items:
            type: string
          description: Part of Speech considered for expansion or analysis.
          examples:
          - - NOUN
            - VERB
          default:
          - NOUN
          - VERB
          - ADJ
          - ADV
        max_synonyms:
          type: integer
          minimum: 1
          description: Maximum number of synonyms to consider.
          examples:
          - 7
          default: 10
      unevaluatedProperties:
        not: {}
    Datasphere.PaginationResponse:
      type: object
      required:
      - self
      - first
      properties:
        self:
          type: string
          format: uri
          description: Link of the current page.
          examples:
          - https://{space_name}.signalwire.com/api/datasphere/documents?page_number=0&page_size=50
        first:
          type: string
          format: uri
          description: Link to the first page.
          examples:
          - https://{space_name}.signalwire.com/api/datasphere/documents?page_number=0&page_size=50
        next:
          type: string
          format: uri
          description: Link to the next page. Only present when there are more results.
          examples:
          - https://{space_name}.signalwire.com/api/datasphere/documents?page_number=1&page_size=50&page_token=PAbff61159-faab-48b3-959a-3021a8f5beca
        prev:
          type: string
          format: uri
          description: Link to the previous page. Only present when not on the first page.
          examples:
          - https://{space_name}.signalwire.com/api/datasphere/documents?page_number=0&page_size=50&page_token=PBbff61159-faab-48b3-959a-3021a8f5beca
      unevaluatedProperties:
        not: {}
    Datasphere.SearchStatusCode422:
      type: object
      required:
      - errors
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Types.StatusCodes.RestApiErrorItem'
          description: List of validation errors.
      unevaluatedProperties:
        not: {}
      description: The request contains invalid parameters. See errors for details.
      examples:
      - statusCode: 422
        errors:
        - type: validation_error
          code: invalid_parameter
          message: Invalid tags
          attribute: tags
          url: https://signalwire.com/docs/apis/error-codes
    Datasphere.Chunk:
      type: object
      required:
      - text
      - document_id
      properties:
        text:
          type: string
          description: A search result.
          examples:
          - Cristiano Ronaldo is the highest-paid football player in the world in 2024
        document_id:
          allOf:
          - $ref: '#/components/schemas/uuid'
          description: Unique ID of the Document.
          examples:
          - acaa5c49-be5e-4477-bce0-48f4b23b7720
      unevaluatedProperties:
        not: {}
    Types.StatusCodes.StatusCode500:
      type: object
      required:
      - error
      properties:
        error:
          type: string
          enum:
          - Internal Server Error
      unevaluatedProperties:
        not: {}
      description: An internal server error occurred.
    uuid:
      type: string
      format: uuid
      description: Universal Unique Identifier.
    Datasphere.SearchResponse:
      type: object
      required:
      - chunks
      properties:
        chunks:
          type: array
          items:
            $ref: '#/components/schemas/Datasphere.Chunk'
          description: A list of search result chunks.
      unevaluatedProperties:
        not: {}
  parameters:
    Datasphere.PathID:
      name: id
      in: path
      required: true
      description: Unique ID of a Document.
      schema:
        $ref: '#/components/schemas/uuid'
    Datasphere.DocumentListQuery.page_number:
      name: page_number
      in: query
      required: false
      description: The page number to retrieve (0-indexed).
      schema:
        type: integer
        format: int32
        minimum: 0
        default: 0
      explode: false
    Datasphere.DocumentListQuery.page_size:
      name: page_size
      in: query
      required: false
      description: Specify the number of results to return on a single page. The default page size is `50` and the maximum is `1000`.
      schema:
        type: integer
        format: int32
        minimum: 1
        maximum: 1000
        default: 50
      explode: false
    Datasphere.DocumentListQuery.page_token:
      name: page_token
      in: query
      required: false
      description: Token for cursor-based pagination. Required when `page_number` > 0.
      schema:
        type: string
      explode: false
  securitySchemes:
    SignalWireBasicAuth:
      type: http
      scheme: Basic
      description: 'SignalWire Basic Authentication using Project ID and API Token.


        The client sends HTTP requests with the Authorization header containing

        the word Basic followed by a space and a base64-encoded string of project_id:token.

        The project ID will be used as the username and the API token as the password.


        Example:

        ```

        Authorization: Basic base64(project_id:token)

        ```'
      x-fern-basic:
        username:
          name: project_id
          env: SIGNALWIRE_PROJECT_ID
        password:
          name: api_token
          env: SIGNALWIRE_API_TOKEN
    SignalWireBearerAuth:
      type: http
      scheme: Bearer
      description: 'SignalWire Bearer Token Authentication for subscriber endpoints.

        The client sends HTTP requests with the Authorization header containing

        the word Bearer followed by a space and the subscriber token.


        Example:

        ```

        Authorization: Bearer <subscriber_token>

        ```'