4chems Consents API

The consents API from 4chems — 1 operation(s) for consents.

Operations 2

GET /v1/consents List Consents #

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/4chems-com:4chems-com-consents-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

4chems-com-consents-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: platform-api Consents API
  description: 'Platform API: infrastructure, operational, and customer tiers.'
  version: 0.12.1
tags:
- name: Consents
paths:
  /v1/consents:
    post:
      tags:
      - Consents
      summary: Record Consent
      description: 'Record acceptance of a legal document version and return the entry; call this

        only after showing the user the document URL and version and receiving an

        explicit affirmative answer.


        Without `tenant_id` it records the caller''s own consent; with `tenant_id` it

        records on behalf of that tenant and needs level owner. Idempotent for an

        already-recorded document+version pair, which returns the existing record with

        a 200 instead of creating a duplicate.'
      operationId: record_consent
      security:
      - HTTPBearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ConsentIn'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ConsentOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      x-destructive: false
      x-idempotent: true
      x-mcp-body-fields:
      - name: document_code
        required: true
      - name: document_version
        required: true
      - name: tenant_id
        required: false
    get:
      tags:
      - Consents
      summary: List Consents
      description: 'Return the caller''s own recorded consents plus the tenant-scope consents of

        every tenant where the caller is at least a viewer. Call this to check which legal

        documents have already been accepted before asking again. Pass `tenant_id` to

        list one tenant''s consents only (a caller of several tenants must).'
      operationId: list_consents
      security:
      - HTTPBearer: []
      parameters:
      - name: tenant_id
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Tenant Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ConsentOut'
                title: Response List Consents
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
            - type: string
            - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
      - loc
      - msg
      - type
      title: ValidationError
    ConsentOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        subject_sub:
          type: string
          title: Subject Sub
        tenant_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Tenant Id
        document_code:
          type: string
          title: Document Code
        document_version:
          type: string
          title: Document Version
        granted_at:
          type: string
          format: date-time
          title: Granted At
        source:
          type: string
          title: Source
      type: object
      required:
      - id
      - subject_sub
      - document_code
      - document_version
      - granted_at
      - source
      title: ConsentOut
    ConsentIn:
      properties:
        document_code:
          type: string
          title: Document Code
        document_version:
          type: string
          title: Document Version
        tenant_id:
          anyOf:
          - type: string
            format: uuid
          - type: 'null'
          title: Tenant Id
          description: Record on behalf of this tenant (needs level owner). Omit to record the caller's own consent.
      type: object
      required:
      - document_code
      - document_version
      title: ConsentIn
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer