Mencoro Organization operations API

Organization operations

GitHub OpenAPI

Operations 1

POST /api/v1/organization-operation-previews Preview an organization operation and obtain a confirmation #

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/mencoro-com:mencoro-com-organization-operations-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

mencoro-com-organization-operations-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Mencoro Organization operations API
  description: 'Public API for Mencoro customers. Authenticate with an API key: `Authorization: Bearer mencoro_sk_...`.'
  termsOfService: https://mencoro.com/legal/
  contact:
    name: Mencoro Support
    url: https://mencoro.com/contact/
    email: support@mencoro.com
  license:
    name: Proprietary
    url: https://mencoro.com/legal/
  version: 1.0.0
servers:
- url: https://api.mencoro.com
  description: Production
security:
- ApiKey: []
tags:
- name: Organization operations
  description: Organization operations
paths:
  /api/v1/organization-operation-previews:
    post:
      tags:
      - Organization operations
      summary: Preview an organization operation and obtain a confirmation
      description: Organization, member and invitation changes need two calls. This one reports the concrete changes, the side effects, the warnings and the conditions, and returns a confirmation valid for five minutes. Send it back in the X-Mencoro-Confirmation header, together with an Idempotency-Key, on the call that performs the operation. Previewing has no effects of any kind.
      operationId: previewOrganizationOperation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                action:
                  type: string
                  enum:
                  - createOrganization
                  - updateOrganization
                  - archiveOrganization
                  - restoreOrganization
                  - changeMemberRole
                  - suspendMember
                  - reactivateMember
                  - createInvitation
                  - cancelInvitation
                organizationId:
                  description: Required for every action except createOrganization.
                  type:
                  - string
                  - 'null'
                  format: uuid
                resourceId:
                  description: The member or invitation the action acts on, for the actions that name one.
                  type:
                  - string
                  - 'null'
                  format: uuid
                payload:
                  description: The body you intend to send to the operation itself.
                  type: object
              type: object
            examples:
              previewAnArchive:
                summary: 'Call one: ask what archiving this organization would do'
                description: Send the body you intend to send to the operation itself as `payload`, so the confirmation is bound to it; an update would carry the fields it means to change. It is omitted here because archiving accepts no body - sending `{}` is equivalent. `resourceId` is omitted too, because archiving acts on no member or invitation, and sending one for an action that names none is a validation error rather than an ignored field.
                value:
                  action: archiveOrganization
                  organizationId: 0193c4f0-11aa-7b22-9d33-4e5f60718293
      responses:
        '200':
          description: What the operation would do, plus a confirmation
          content:
            application/json:
              schema:
                properties:
                  action:
                    type: string
                  organization:
                    description: The organization the operation acts on. For createOrganization there is none yet, so `id` is null and `name` carries the name you proposed — the preview shows what you are about to create rather than hiding it. Branch on `organization.id`, never on `organization` itself.
                    properties:
                      id:
                        type:
                        - string
                        - 'null'
                        format: uuid
                      name:
                        type: string
                    type:
                    - object
                    - 'null'
                  resourceId:
                    description: The member or invitation the action acts on; null for the actions that name none.
                    type:
                    - string
                    - 'null'
                    format: uuid
                  changes:
                    description: What the operation itself will do.
                    type: array
                    items:
                      $ref: '#/components/schemas/OperationEffect'
                  sideEffects:
                    description: What else it will cause, with the records it will touch in `targets`.
                    type: array
                    items:
                      $ref: '#/components/schemas/OperationEffect'
                  warnings:
                    description: 'How the system behaves around it. Not part of the effects digest: rewording one does not invalidate a confirmation.'
                    type: array
                    items:
                      $ref: '#/components/schemas/OperationEffect'
                  conditions:
                    description: What must hold for the operation to be allowed.
                    type: array
                    items:
                      $ref: '#/components/schemas/OperationEffect'
                  actor:
                    description: 'Who the confirmation is issued to: the user and the API key. It is valid for that pair only.'
                    type: object
                  confirmation:
                    description: The token to send back, the header to send it in, and how long it lives.
                    type: object
                type: object
              examples:
                archivePreview:
                  summary: 'Call one of two: the declared effects, and the confirmation that authorises exactly them'
                  description: 'Read from live state, so it enumerates what the background subscribers will actually touch rather than what the command name suggests. `changes` is the operation itself, `sideEffects` what else it causes with the records it will touch in `targets`, `warnings` how the system behaves, and `conditions` what must hold for the call to be allowed. Send `confirmation.token` in the `confirmation.header` header of the operation, together with an Idempotency-Key, within `confirmation.expiresInSeconds`. The confirmation is single use and is bound to this key, this user, this organization, this action, this payload AND these effects: if a project is added or an invitation accepted in between, the effects no longer match and the operation is refused rather than doing more than was agreed. Previewing has no effects of any kind.'
                  value:
                    action: archiveOrganization
                    organization:
                      id: 0193c4f0-11aa-7b22-9d33-4e5f60718293
                      name: Acme GmbH
                    resourceId: null
                    changes:
                    - code: organization_will_be_archived
                      summary: '"Acme GmbH" will be archived.'
                      targets: []
                    sideEffects:
                    - code: projects_will_be_archived
                      summary: 2 active project(s) will be archived.
                      targets:
                      - 0193c4f1-8e2a-7c31-9d40-5b6f1a2c3d4e
                      - 0193c4f1-9a77-7f08-8e12-c30d9b5a7e61
                    - code: pending_invitations_will_be_cancelled
                      summary: 1 pending invitation(s) will be cancelled.
                      targets:
                      - 0193c4f2-2d15-7b60-9f81-a4c7e0d39215
                    - code: subscription_will_be_cancelled_at_period_end
                      summary: The subscription will be cancelled at the end of the current billing period.
                      targets: []
                    warnings:
                    - code: effects_are_asynchronous
                      summary: The project, invitation and subscription effects are applied by background subscribers. A successful response means the organization was archived, not that every effect has finished.
                      targets: []
                    conditions:
                    - code: requires_owner
                      summary: You must be an owner of this organization.
                      targets: []
                    - code: requires_active_organization
                      summary: The organization must currently be active.
                      targets: []
                    actor:
                      userId: 0193c4ef-6a01-7c8d-8b44-19e2f3a5c607
                      email: ops@acme.example
                      apiKeyId: 0193c4ef-8f3b-7d22-9a15-63b0c8d41e57
                    confirmation:
                      token: mencoro_conf_VmajQznkILZjvFf63JexmT1AKX7iYZjOGSrBZYxlUTk
                      expiresAt: '2026-03-04T11:27:33+00:00'
                      expiresInSeconds: 300
                      header: X-Mencoro-Confirmation
        '400':
          description: Unknown action, or a payload the operation does not accept
        '401':
          description: Missing or invalid API key
        '403':
          description: The key lacks a required capability, or its scope is too narrow
        '404':
          description: No organization the caller can access under this id
components:
  schemas:
    OperationEffect:
      description: A single declared change, side effect, warning or condition
      required:
      - code
      - summary
      properties:
        code:
          description: Stable machine-readable identifier for this effect
          type: string
          example: projects_will_be_archived
        summary:
          description: Human-readable description, safe to show to whoever must approve the operation
          type: string
        targets:
          type: array
          items:
            type: string
          default: []
      type: object
  securitySchemes:
    ApiKey:
      type: http
      description: 'A Mencoro API key, created from the app under API keys in the user menu. The plaintext key is shown once, at creation, and never again. A key only ever RESTRICTS: it never grants more than its owner''s live membership and role already allow, and every request re-checks those.'
      scheme: bearer