Moesif · Capability

Management API — Companies

Management API — Companies. 6 operations. Lead operation: Update a Company. Self-contained Naftiko capability covering one Moesif business surface.

Run with Naftiko MoesifCompanies

What You Can Do

POST
Updatecompanies — Update a Company
/v1/search//companies
POST
Batchupdatecompanies — Update Companies in Batch
/v1/search//companies/batch
GET
Getcompany — Get a Company
/v1/search//companies/{id}
DELETE
Deletecompany — Delete a Company
/v1/search//companies/{id}
POST
Countcompanies — Count Companies
/v1/search//count/companies
POST
Searchcompanymetrics — Search CompanyMetrics/Companies
/v1/search//search/companymetrics/companies

MCP Tools

update-company

Update a Company

update-companies-batch

Update Companies in Batch

get-company

Get a Company

read-only idempotent
delete-company

Delete a Company

idempotent
count-companies

Count Companies

search-companymetrics-companies

Search CompanyMetrics/Companies

read-only

Capability Spec

moesif-companies.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Management API — Companies
  description: 'Management API — Companies. 6 operations. Lead operation: Update a Company. Self-contained Naftiko capability
    covering one Moesif business surface.'
  tags:
  - Moesif
  - Companies
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    MOESIF_API_KEY: MOESIF_API_KEY
capability:
  consumes:
  - type: http
    namespace: moesif-companies
    baseUri: https://api.moesif.com/v1
    description: Management API — Companies business capability. Self-contained, no shared references.
    resources:
    - name: search-~-companies
      path: /search/~/companies
      operations:
      - name: updatecompanies
        method: POST
        description: Update a Company
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          required: true
        - name: app_id
          in: query
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: search-~-companies-batch
      path: /search/~/companies/batch
      operations:
      - name: batchupdatecompanies
        method: POST
        description: Update Companies in Batch
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          required: true
        - name: app_id
          in: query
          type: string
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: search-~-companies-id
      path: /search/~/companies/{id}
      operations:
      - name: getcompany
        method: GET
        description: Get a Company
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          required: true
        - name: app_id
          in: query
          type: string
        - name: id
          in: path
          type: string
          required: true
      - name: deletecompany
        method: DELETE
        description: Delete a Company
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          required: true
        - name: app_id
          in: query
          type: string
        - name: id
          in: path
          type: string
          required: true
        - name: delete_events
          in: query
          type: boolean
          description: Delete events associated with the company which can be set to true or false(default)
    - name: search-~-count-companies
      path: /search/~/count/companies
      operations:
      - name: countcompanies
        method: POST
        description: Count Companies
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          required: true
        - name: app_id
          in: query
          type: string
          required: true
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: search-~-search-companymetrics-companies
      path: /search/~/search/companymetrics/companies
      operations:
      - name: searchcompanymetrics
        method: POST
        description: Search CompanyMetrics/Companies
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: orgId
          in: path
          type: string
          required: true
        - name: app_id
          in: query
          type: string
        - name: from
          in: query
          type: string
          description: The start date, which can be absolute such as 2023-07-01T00:00:00Z or relative such as -24h
        - name: to
          in: query
          type: string
          description: The end date, which can be absolute such as 2023-07-02T00:00:00Z or relative such as now
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    authentication:
      type: bearer
      token: '{{env.MOESIF_API_KEY}}'
  exposes:
  - type: rest
    namespace: moesif-companies-rest
    port: 8080
    description: REST adapter for Management API — Companies. One Spectral-compliant resource per consumed operation, prefixed
      with /v1.
    resources:
    - path: /v1/search//companies
      name: search-companies
      description: REST surface for search-~-companies.
      operations:
      - method: POST
        name: updatecompanies
        description: Update a Company
        call: moesif-companies.updatecompanies
        with:
          orgId: rest.orgId
          app_id: rest.app_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/search//companies/batch
      name: search-companies-batch
      description: REST surface for search-~-companies-batch.
      operations:
      - method: POST
        name: batchupdatecompanies
        description: Update Companies in Batch
        call: moesif-companies.batchupdatecompanies
        with:
          orgId: rest.orgId
          app_id: rest.app_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/search//companies/{id}
      name: search-companies-id
      description: REST surface for search-~-companies-id.
      operations:
      - method: GET
        name: getcompany
        description: Get a Company
        call: moesif-companies.getcompany
        with:
          orgId: rest.orgId
          app_id: rest.app_id
          id: rest.id
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deletecompany
        description: Delete a Company
        call: moesif-companies.deletecompany
        with:
          orgId: rest.orgId
          app_id: rest.app_id
          id: rest.id
          delete_events: rest.delete_events
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/search//count/companies
      name: search-count-companies
      description: REST surface for search-~-count-companies.
      operations:
      - method: POST
        name: countcompanies
        description: Count Companies
        call: moesif-companies.countcompanies
        with:
          orgId: rest.orgId
          app_id: rest.app_id
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/search//search/companymetrics/companies
      name: search-search-companymetrics-companies
      description: REST surface for search-~-search-companymetrics-companies.
      operations:
      - method: POST
        name: searchcompanymetrics
        description: Search CompanyMetrics/Companies
        call: moesif-companies.searchcompanymetrics
        with:
          orgId: rest.orgId
          app_id: rest.app_id
          from: rest.from
          to: rest.to
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: moesif-companies-mcp
    port: 9090
    transport: http
    description: MCP adapter for Management API — Companies. One tool per consumed operation, routed inline through this capability's
      consumes block.
    tools:
    - name: update-company
      description: Update a Company
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: moesif-companies.updatecompanies
      with:
        orgId: tools.orgId
        app_id: tools.app_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: update-companies-batch
      description: Update Companies in Batch
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: moesif-companies.batchupdatecompanies
      with:
        orgId: tools.orgId
        app_id: tools.app_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: get-company
      description: Get a Company
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: moesif-companies.getcompany
      with:
        orgId: tools.orgId
        app_id: tools.app_id
        id: tools.id
      outputParameters:
      - type: object
        mapping: $.
    - name: delete-company
      description: Delete a Company
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: moesif-companies.deletecompany
      with:
        orgId: tools.orgId
        app_id: tools.app_id
        id: tools.id
        delete_events: tools.delete_events
      outputParameters:
      - type: object
        mapping: $.
    - name: count-companies
      description: Count Companies
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: moesif-companies.countcompanies
      with:
        orgId: tools.orgId
        app_id: tools.app_id
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: search-companymetrics-companies
      description: Search CompanyMetrics/Companies
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: moesif-companies.searchcompanymetrics
      with:
        orgId: tools.orgId
        app_id: tools.app_id
        from: tools.from
        to: tools.to
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.