smplkit Contexts API

The Contexts API from smplkit — 3 operation(s) for contexts.

GitHub OpenAPI

Operations 5

POST /api/v1/contexts/bulk Bulk Register Contexts #
GET /api/v1/contexts List Contexts #
GET /api/v1/contexts/{id} Get Context #
PUT /api/v1/contexts/{id} Update Context #
DELETE /api/v1/contexts/{id} Delete Context #

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/smplkit-com:smplkit-com-contexts-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

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. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

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

OpenAPI Specification

smplkit-com-contexts-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: smplkit Contexts API
  description: API for the smplkit platform.
  version: 0.1.0
tags:
- name: Contexts
paths:
  /api/v1/contexts/bulk:
    post:
      tags:
      - Contexts
      summary: Bulk Register Contexts
      description: Register context instances in bulk. Creates context types automatically if they don't exist.
      operationId: bulk_register_contexts
      requestBody:
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ContextBulkRegister'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ContextBatchResponse'
        '400':
          description: Validation error or malformed request
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid authentication
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
      - HTTPBearer: []
  /api/v1/contexts:
    get:
      tags:
      - Contexts
      summary: List Contexts
      description: List context instances for the authenticated account. `filter[context_type]` narrows the result to one context type. `filter[search]` does a case-insensitive substring match against the context `key`, `name`, and every attribute value, returning any context where at least one of those fields contains the search term.
      operationId: list_contexts
      security:
      - HTTPBearer: []
      parameters:
      - name: filter[context_type]
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          description: Limit results to context instances of this context type (e.g. `user`).
          title: Filter[Context Type]
        description: Limit results to context instances of this context type (e.g. `user`).
      - name: filter[search]
        in: query
        required: false
        schema:
          type:
          - string
          - 'null'
          description: Case-insensitive substring match against the `key`, `name`, and any attribute value. A context is returned if at least one of those fields contains the search term.
          title: Filter[Search]
        description: Case-insensitive substring match against the `key`, `name`, and any attribute value. A context is returned if at least one of those fields contains the search term.
      - name: sort
        in: query
        required: false
        schema:
          type: string
          description: 'Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `created_at`, `-created_at`, `key`, `-key`, `name`, `-name`, `updated_at`, `-updated_at`.'
          enum:
          - created_at
          - -created_at
          - key
          - -key
          - name
          - -name
          - updated_at
          - -updated_at
          default: key
          title: Sort
        description: 'Field to sort by. Prefix with `-` for descending order. Default: `key`. Allowed values: `created_at`, `-created_at`, `key`, `-key`, `name`, `-name`, `updated_at`, `-updated_at`.'
      - name: page[number]
        in: query
        required: false
        schema:
          type: integer
          description: 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
          default: 1
          title: Page[Number]
        description: 1-based page number to return. Optional; defaults to `1` when omitted. Must be `>= 1` — requests with a smaller value are rejected with a 400 error.
      - name: page[size]
        in: query
        required: false
        schema:
          type: integer
          description: Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
          default: 1000
          title: Page[Size]
        description: Number of items per page. Optional; defaults to `1000` when omitted. Must be between `1` and `1000` inclusive — requests outside that range are rejected with a 400 error.
      - name: meta[total]
        in: query
        required: false
        schema:
          type: boolean
          description: When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
          default: false
          title: Meta[Total]
        description: When `true`, the response's `meta.pagination` block includes `total` (the total number of matching items across all pages) and `total_pages`. Computing these requires an extra `COUNT` query, so omit (or pass `false`) when the totals are not needed. Defaults to `false`.
      responses:
        '200':
          description: Successful Response
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ContextListResponse'
        '400':
          description: Validation error or malformed request
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid authentication
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
  /api/v1/contexts/{id}:
    get:
      tags:
      - Contexts
      summary: Get Context
      description: Return a context instance by composite id (type:key).
      operationId: get_context
      security:
      - HTTPBearer: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          title: Id
      responses:
        '200':
          description: Successful Response
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ContextResponse'
        '400':
          description: Validation error or malformed request
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid authentication
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    put:
      tags:
      - Contexts
      summary: Update Context
      description: Update a context instance by composite id (type:key). Only the human-readable display name is mutable here; `context_type` and observed `attributes` are written by SDK registration and ignored on this endpoint.
      operationId: update_context
      security:
      - HTTPBearer: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          title: Id
      requestBody:
        required: true
        content:
          application/vnd.api+json:
            schema:
              $ref: '#/components/schemas/ContextRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ContextResponse'
        '400':
          description: Validation error or malformed request
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid authentication
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
    delete:
      tags:
      - Contexts
      summary: Delete Context
      description: Delete a context instance by composite id (type:key).
      operationId: delete_context
      security:
      - HTTPBearer: []
      parameters:
      - name: id
        in: path
        required: true
        schema:
          type: string
          title: Id
      responses:
        '204':
          description: Successful Response
        '400':
          description: Validation error or malformed request
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing or invalid authentication
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Resource not found
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/vnd.api+json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    ContextBulkItem:
      properties:
        type:
          type: string
          title: Type
          description: Key of the context type this instance belongs to (e.g. `user`, `account`, `device`).
        key:
          type: string
          title: Key
          description: Entity identifier within the context type, e.g. `user-123`.
        attributes:
          additionalProperties: true
          type: object
          title: Attributes
          description: Observed attribute values for this context instance.
      type: object
      required:
      - type
      - key
      title: ContextBulkItem
      description: One context instance in a bulk registration payload.
      example:
        attributes:
          first_name: Alice
          plan: enterprise
        key: user-123
        type: user
    ListMeta:
      properties:
        pagination:
          $ref: '#/components/schemas/PaginationMeta'
      type: object
      required:
      - pagination
      title: ListMeta
      description: Top-level ``meta`` block included on every JSON:API list response.
    ErrorResponse:
      properties:
        errors:
          items:
            $ref: '#/components/schemas/Error'
          type: array
          title: Errors
      type: object
      required:
      - errors
      title: ErrorResponse
      description: JSON:API error response envelope.
    ContextRequest:
      properties:
        data:
          $ref: '#/components/schemas/ContextResource'
      type: object
      required:
      - data
      title: ContextRequest
      description: JSON:API request envelope for creating or updating a context instance.
    Error:
      properties:
        status:
          type: string
          title: Status
        title:
          type: string
          title: Title
        detail:
          type:
          - string
          - 'null'
          title: Detail
        source:
          additionalProperties: true
          type:
          - object
          - 'null'
          title: Source
      type: object
      required:
      - status
      - title
      title: Error
      description: Single JSON:API error object.
    ContextBulkRegister:
      properties:
        contexts:
          items:
            $ref: '#/components/schemas/ContextBulkItem'
          type: array
          title: Contexts
          description: One context instance per entry.
      type: object
      required:
      - contexts
      title: ContextBulkRegister
      description: Bulk registration request body for the contexts endpoint.
    ContextBatchResponse:
      properties:
        registered:
          type: integer
          title: Registered
          description: Number of context instances that were created or updated.
      type: object
      required:
      - registered
      title: ContextBatchResponse
      description: Summary returned by the bulk context registration endpoint.
    ContextListResponse:
      properties:
        data:
          items:
            $ref: '#/components/schemas/ContextResource'
          type: array
          title: Data
        meta:
          $ref: '#/components/schemas/ListMeta'
      type: object
      required:
      - data
      - meta
      title: ContextListResponse
      description: JSON:API collection response for context instances.
    ContextResponse:
      properties:
        data:
          $ref: '#/components/schemas/ContextResource'
      type: object
      required:
      - data
      title: ContextResponse
      description: JSON:API single-resource response envelope for a context instance.
    ContextResource:
      properties:
        id:
          type:
          - string
          - 'null'
          title: Id
        type:
          type: string
          enum:
          - context
          title: Type
        attributes:
          $ref: '#/components/schemas/Context'
      type: object
      required:
      - type
      - attributes
      title: ContextResource
      description: 'JSON:API resource envelope for a context instance.


        `id` is the composite identifier `context_type:key` (e.g. `user:alice-123`).'
      example:
        attributes:
          attributes:
            first_name: Alice
            plan: enterprise
          context_type: user
          created_at: '2026-03-31T10:00:00Z'
          key: alice-123
          name: Alice Smith
          updated_at: '2026-03-31T10:00:00Z'
        id: user:alice-123
        type: context
    PaginationMeta:
      properties:
        page:
          type: integer
          title: Page
          description: 1-based page number returned.
        size:
          type: integer
          title: Size
          description: Number of items per page.
        total:
          type:
          - integer
          - 'null'
          title: Total
          description: Total number of matching items across all pages. Present only when the request included `meta[total]=true`.
        total_pages:
          type:
          - integer
          - 'null'
          title: Total Pages
          description: Total number of pages at the requested page size. Present only when the request included `meta[total]=true`.
      type: object
      required:
      - page
      - size
      title: PaginationMeta
      description: 'Pagination block returned inside ``meta`` on every list response.


        ``page`` and ``size`` are always present and echo the parameters that

        served the response (their defaults when the client omitted them).

        ``total`` and ``total_pages`` are present only when the request included

        ``meta[total]=true``.'
    Context:
      properties:
        key:
          type:
          - string
          - 'null'
          title: Key
          description: Entity identifier within the context type (e.g. `alice-123`). Together with `context_type` it forms the composite `id` `context_type:key`. Always populated in responses; declared optional only so SDK consumers can construct a draft Context without a key. Set by the bulk-register API; not editable.
          readOnly: true
        name:
          type:
          - string
          - 'null'
          title: Name
          description: Human-readable display name for the context instance.
        context_type:
          type: string
          title: Context Type
          description: Key of the context type this instance belongs to (e.g. `user`, `account`).
        attributes:
          additionalProperties: true
          type: object
          title: Attributes
          description: Observed attribute values for this context instance. The key set is conventionally aligned with the parent context type's known attribute keys, but additional keys are accepted.
        created_at:
          type:
          - string
          - 'null'
          format: date-time
          title: Created At
          description: When the context instance was first registered.
          readOnly: true
        updated_at:
          type:
          - string
          - 'null'
          format: date-time
          title: Updated At
          description: When the context instance was last modified.
          readOnly: true
      type: object
      required:
      - context_type
      title: Context
      description: 'A specific instance of a context type — for example, a particular

        user, account, or device — together with the attributes observed on it.


        Context instances are addressed by a composite identifier of the form

        `context_type:key` (e.g. `user:alice-123`).'
      example:
        attributes:
          first_name: Alice
          plan: enterprise
        context_type: user
        created_at: '2026-03-31T10:00:00Z'
        key: alice-123
        name: Alice Smith
        updated_at: '2026-03-31T10:00:00Z'
  securitySchemes:
    HTTPBearer:
      type: http
      description: JWT access token or API key (sk_api_*)
      scheme: bearer