Codehooks Documents API

CRUD operations on NoSQL collection documents

Operations 9

GET /{collection} Codehooks List documents in a collection #
POST /{collection} Codehooks Create a new document #
GET /{collection}/{id} Codehooks Get a document by ID #
PUT /{collection}/{id} Codehooks Replace a document #
PATCH /{collection}/{id} Codehooks Update a document #
DELETE /{collection}/{id} Codehooks Delete a document #
PATCH /{collection}/_byquery Codehooks Update multiple documents by query #
DELETE /{collection}/_byquery Codehooks Delete multiple documents by query #
GET /{collection}/_count Codehooks Count documents in a collection #

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/codehooks-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

codehooks-documents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Codehooks Database REST Documents API
  description: The Codehooks.io Database REST API provides a complete and secure REST API for basic database CRUD (Create, Read, Update, Delete) operations on NoSQL collections. The API supports querying with MongoDB-like syntax, pagination, sorting, and field selection. It also includes a key-value store for caching and fast lookups, and a queue system for asynchronous job processing. All endpoints are prefixed with the project ID and datastore space name.
  version: 1.0.0
  contact:
    name: Codehooks
    url: https://codehooks.io/
  license:
    name: Proprietary
    url: https://codehooks.io/terms
servers:
- url: https://{projectId}.api.codehooks.io/{space}
  description: Codehooks API endpoint
  variables:
    projectId:
      default: myproject-ff00
      description: The project ID assigned to your Codehooks project
    space:
      default: dev
      description: The datastore space name (e.g. dev, staging, prod)
security:
- apiKey: []
tags:
- name: Documents
  description: CRUD operations on NoSQL collection documents
paths:
  /{collection}:
    get:
      operationId: listDocuments
      summary: Codehooks List documents in a collection
      description: Retrieve documents from a collection with optional query parameters for filtering, sorting, pagination, and field selection. Supports both simple key-value query parameters and advanced NoSQL JSON query syntax via the q parameter.
      tags:
      - Documents
      parameters:
      - name: collection
        in: path
        required: true
        description: The name of the collection to query
        schema:
          type: string
      - name: q
        in: query
        description: Advanced NoSQL JSON query object (URL-encoded). Supports MongoDB-like operators such as $gt, $gte, $lt, $lte, $ne, $in, $nin, $exists, $regex, $or, and $and.
        schema:
          type: string
      - name: h
        in: query
        description: Query hints as a JSON object (URL-encoded). Supports fields, sort, skip, limit, and projection.
        schema:
          type: string
      - name: limit
        in: query
        description: Maximum number of documents to return
        schema:
          type: integer
          default: 100
      - name: offset
        in: query
        description: Number of documents to skip in the result set
        schema:
          type: integer
          default: 0
      - name: sort
        in: query
        description: Comma-separated list of fields to sort by. Prefix with - for descending order.
        schema:
          type: string
      - name: fields
        in: query
        description: Comma-separated list of fields to include in the response
        schema:
          type: string
      responses:
        '200':
          description: A list of documents matching the query
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/Document'
        '401':
          description: Unauthorized - invalid or missing API key
        '404':
          description: Collection not found
    post:
      operationId: createDocument
      summary: Codehooks Create a new document
      description: Create a new document in the specified collection. The document will be assigned a unique _id if one is not provided.
      tags:
      - Documents
      parameters:
      - name: collection
        in: path
        required: true
        description: The name of the collection to add the document to
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentInput'
      responses:
        '201':
          description: Document created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '400':
          description: Invalid document data
        '401':
          description: Unauthorized - invalid or missing API key
  /{collection}/{id}:
    get:
      operationId: getDocument
      summary: Codehooks Get a document by ID
      description: Retrieve a single document from a collection by its unique identifier.
      tags:
      - Documents
      parameters:
      - name: collection
        in: path
        required: true
        description: The name of the collection
        schema:
          type: string
      - name: id
        in: path
        required: true
        description: The unique identifier of the document
        schema:
          type: string
      responses:
        '200':
          description: The requested document
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '401':
          description: Unauthorized - invalid or missing API key
        '404':
          description: Document not found
    put:
      operationId: replaceDocument
      summary: Codehooks Replace a document
      description: Replace an entire document in the collection by its unique identifier. The entire document is replaced with the provided data.
      tags:
      - Documents
      parameters:
      - name: collection
        in: path
        required: true
        description: The name of the collection
        schema:
          type: string
      - name: id
        in: path
        required: true
        description: The unique identifier of the document
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentInput'
      responses:
        '200':
          description: Document replaced successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '400':
          description: Invalid document data
        '401':
          description: Unauthorized - invalid or missing API key
        '404':
          description: Document not found
    patch:
      operationId: updateDocument
      summary: Codehooks Update a document
      description: Partially update a document in the collection by its unique identifier. Only the provided fields are updated. Supports MongoDB-like update operators such as $set, $inc, $unset, $push, and $pull.
      tags:
      - Documents
      parameters:
      - name: collection
        in: path
        required: true
        description: The name of the collection
        schema:
          type: string
      - name: id
        in: path
        required: true
        description: The unique identifier of the document
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentUpdate'
      responses:
        '200':
          description: Document updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Document'
        '400':
          description: Invalid update data
        '401':
          description: Unauthorized - invalid or missing API key
        '404':
          description: Document not found
    delete:
      operationId: deleteDocument
      summary: Codehooks Delete a document
      description: Delete a single document from a collection by its unique identifier.
      tags:
      - Documents
      parameters:
      - name: collection
        in: path
        required: true
        description: The name of the collection
        schema:
          type: string
      - name: id
        in: path
        required: true
        description: The unique identifier of the document
        schema:
          type: string
      responses:
        '200':
          description: Document deleted successfully
        '401':
          description: Unauthorized - invalid or missing API key
        '404':
          description: Document not found
  /{collection}/_byquery:
    patch:
      operationId: updateDocumentsByQuery
      summary: Codehooks Update multiple documents by query
      description: Update multiple documents in a collection that match the provided query parameters. Supports MongoDB-like update operators such as $set, $inc, $unset, $push, and $pull.
      tags:
      - Documents
      parameters:
      - name: collection
        in: path
        required: true
        description: The name of the collection
        schema:
          type: string
      - name: q
        in: query
        description: NoSQL JSON query object (URL-encoded) to select documents to update.
        schema:
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DocumentUpdate'
      responses:
        '200':
          description: Documents updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    description: Number of documents updated
        '400':
          description: Invalid update data or query
        '401':
          description: Unauthorized - invalid or missing API key
    delete:
      operationId: deleteDocumentsByQuery
      summary: Codehooks Delete multiple documents by query
      description: Delete multiple documents in a collection that match the provided query parameters.
      tags:
      - Documents
      parameters:
      - name: collection
        in: path
        required: true
        description: The name of the collection
        schema:
          type: string
      - name: q
        in: query
        description: NoSQL JSON query object (URL-encoded) to select documents to delete.
        schema:
          type: string
      responses:
        '200':
          description: Documents deleted successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
                    description: Number of documents deleted
        '401':
          description: Unauthorized - invalid or missing API key
  /{collection}/_count:
    get:
      operationId: countDocuments
      summary: Codehooks Count documents in a collection
      description: Return the count of documents in a collection, optionally filtered by a query.
      tags:
      - Documents
      parameters:
      - name: collection
        in: path
        required: true
        description: The name of the collection
        schema:
          type: string
      - name: q
        in: query
        description: Optional NoSQL JSON query object to filter the count
        schema:
          type: string
      responses:
        '200':
          description: The count of matching documents
          content:
            application/json:
              schema:
                type: object
                properties:
                  count:
                    type: integer
        '401':
          description: Unauthorized - invalid or missing API key
components:
  schemas:
    DocumentInput:
      type: object
      additionalProperties: true
      description: Input data for creating or replacing a document. Any valid JSON object is accepted.
    DocumentUpdate:
      type: object
      additionalProperties: true
      description: Partial update data for a document. Supports direct field updates or MongoDB-like update operators such as $set, $inc, $unset, $push, and $pull.
    Document:
      type: object
      properties:
        _id:
          type: string
          description: Unique document identifier
      additionalProperties: true
      description: A document in a Codehooks collection. Documents are schema-flexible JSON objects with a system-assigned _id.
  securitySchemes:
    apiKey:
      type: apiKey
      name: x-apikey
      in: header
      description: API key for authentication. Obtain from the Codehooks.io dashboard or CLI.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT token for authentication