4chems Tenants API

The tenants API from 4chems — 2 operation(s) for tenants.

Operations 3

POST /infra/tenants Create Tenant Endpoint #
GET /infra/tenants List Tenants Endpoint #
GET /infra/tenants/{tenant_id} Get Tenant Endpoint #

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-tenants-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-tenants-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: platform-api Tenants API
  description: 'Platform API: infrastructure, operational, and customer tiers.'
  version: 0.12.1
tags:
- name: Tenants
paths:
  /infra/tenants:
    post:
      tags:
      - Tenants
      summary: Create Tenant Endpoint
      description: 'Provision a new tenant asynchronously and return the operation envelope. Call

        this when an infra admin needs to create a tenant outside the self-service

        trial flow. Returns 202 + Location: /infra/operations/{id}.'
      operationId: create_tenant
      security:
      - HTTPBearer: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TenantCreateIn'
      responses:
        '202':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OperationOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
    get:
      tags:
      - Tenants
      summary: List Tenants Endpoint
      description: 'List tenants with optional status / domain filters (paginated). Call this

        when an infra admin needs to find a tenant before inspecting or acting on it.'
      operationId: list_tenants
      security:
      - HTTPBearer: []
      parameters:
      - name: status
        in: query
        required: false
        schema:
          anyOf:
          - $ref: '#/components/schemas/TenantStatus'
          - type: 'null'
          title: Status
      - name: domain
        in: query
        required: false
        schema:
          anyOf:
          - type: string
          - type: 'null'
          title: Domain
      - name: offset
        in: query
        required: false
        schema:
          type: integer
          minimum: 0
          default: 0
          title: Offset
      - name: limit
        in: query
        required: false
        schema:
          type: integer
          maximum: 200
          minimum: 1
          default: 50
          title: Limit
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantListOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
  /infra/tenants/{tenant_id}:
    get:
      tags:
      - Tenants
      summary: Get Tenant Endpoint
      description: 'Retrieve a single tenant''s full detail by UUID. Call this when an infra admin

        needs a tenant''s current status and metadata before acting on it.'
      operationId: get_tenant
      security:
      - HTTPBearer: []
      parameters:
      - name: tenant_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
          title: Tenant Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TenantOut'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TenantListOut:
      properties:
        items:
          items:
            $ref: '#/components/schemas/TenantOut'
          type: array
          title: Items
        total:
          type: integer
          title: Total
        offset:
          type: integer
          title: Offset
        limit:
          type: integer
          title: Limit
      type: object
      required:
      - items
      - total
      - offset
      - limit
      title: TenantListOut
    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
    ErrorDetail:
      properties:
        code:
          type: string
          title: Code
        message:
          type: string
          title: Message
      type: object
      required:
      - code
      - message
      title: ErrorDetail
    AttestationIn:
      properties:
        attested:
          type: boolean
          title: Attested
        email:
          type: string
          format: email
          title: Email
      type: object
      required:
      - attested
      - email
      title: AttestationIn
      description: Attestation checkbox (NFR-006 pt 8). Stored with timestamp on the tenant row.
    TenantOut:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        slug:
          type: string
          title: Slug
        name:
          type: string
          title: Name
        domain:
          type: string
          title: Domain
        status:
          type: string
          title: Status
        flavour:
          anyOf:
          - type: string
          - type: 'null'
          title: Flavour
        created_by_email:
          type: string
          title: Created By Email
        attested_at:
          type: string
          format: date-time
          title: Attested At
        attested_by_email:
          type: string
          title: Attested By Email
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
      - id
      - slug
      - name
      - domain
      - status
      - flavour
      - created_by_email
      - attested_at
      - attested_by_email
      - created_at
      - updated_at
      title: TenantOut
    TenantStatus:
      type: string
      enum:
      - provisioning
      - pending_activation
      - active
      - disabled
      title: TenantStatus
    OperationOut:
      properties:
        operation_id:
          type: string
          format: uuid
          title: Operation Id
        status:
          type: string
          title: Status
        type:
          type: string
          title: Type
        target_type:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Type
        target_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Target Id
        result:
          anyOf:
          - {}
          - type: 'null'
          title: Result
        error:
          anyOf:
          - $ref: '#/components/schemas/ErrorDetail'
          - type: 'null'
        created_at:
          type: string
          format: date-time
          title: Created At
        finished_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Finished At
      type: object
      required:
      - operation_id
      - status
      - type
      - created_at
      title: OperationOut
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    LegalEntityIn:
      properties:
        country:
          type: string
          pattern: ^[A-Z]{2}$
          title: Country
        legal_entity_type:
          type: string
          pattern: ^[A-Z]{2,3}_[A-Z0-9][A-Z0-9_]*$
          title: Legal Entity Type
        other_label:
          anyOf:
          - type: string
            maxLength: 80
            minLength: 2
          - type: 'null'
          title: Other Label
        name:
          type: string
          maxLength: 200
          minLength: 1
          title: Name
      type: object
      required:
      - country
      - legal_entity_type
      - name
      title: LegalEntityIn
      description: "Composite legal-entity input validated against the country catalog.\n\nRules:\n- *country* must be a supported market (validated at field level via SupportedCountry,\n  caught in the model validator against the loaded catalog).\n- *legal_entity_type* must appear in that country's catalog file.\n- When *legal_entity_type* is ``<CC>_OTHER``, *other_label* is required (2-80 chars).\n- For any other type, *other_label* must be absent."
    TenantCreateIn:
      properties:
        slug:
          type: string
          pattern: ^[a-z0-9][a-z0-9-]{0,30}$
          title: Slug
        name:
          type: string
          maxLength: 200
          minLength: 1
          title: Name
        initial_admin_email:
          type: string
          format: email
          title: Initial Admin Email
        attestation:
          $ref: '#/components/schemas/AttestationIn'
        legal_entity:
          $ref: '#/components/schemas/LegalEntityIn'
        allow_duplicate_domain:
          type: boolean
          title: Allow Duplicate Domain
          default: false
      type: object
      required:
      - slug
      - name
      - initial_admin_email
      - attestation
      - legal_entity
      title: TenantCreateIn
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer