> ## Documentation Index
> Fetch the complete documentation index at: https://docs.paywise.de/llms.txt
> Use this file to discover all available pages before exploring further.

# Release a company

> End all of this partner's access to a managed company. The company keeps its submitted cases, users, portal access and any credentials of its own. Orders this partner created on the company's behalf and never submitted are deleted; submitted orders and the company's own drafts survive. The company's `external_reference` is cleared so the same reference can onboard a fresh company later; the record itself stays attributed to the partner for history. Emits `company.access.revoked` with `reason: "partner_released"`. Requires an `Idempotency-Key` header and the `partner:companies:write` scope. Returns only an id and `case_access: unavailable` receipt. The same key replays this receipt; a new key after disconnection returns 404.



## OpenAPI

````yaml /api-docs/partner-api/openapi.json post /partner/v2/companies/{id}/release/
openapi: 3.0.3
info:
  description: >-
    Onboard and manage companies and their memberships through the current API
    at the `/partner/v2/` HTTP path.
  title: paywise Partner API
  version: current
servers:
  - description: Production environment
    url: https://api.paywise.de
  - description: Sandbox environment
    url: https://api-sandbox.paywise.de
security: []
tags:
  - description: Client companies managed by the partner.
    name: Companies
  - description: Memberships and invitations of a managed company.
    name: Company users
  - description: Webhook endpoints and their signing secrets.
    name: Webhooks
  - description: Delivery log and redelivery of webhook events.
    name: Webhook deliveries
  - description: Ordered feed of the events webhooks deliver.
    name: Events
  - description: Reference catalog of legal forms.
    name: Legal forms
  - description: The authenticated credential and API availability.
    name: Meta
  - description: Rate-limit headroom of the credential.
    name: Usage
externalDocs:
  url: https://docs.paywise.de/api-docs/partner-api/introduction
paths:
  /partner/v2/companies/{id}/release/:
    post:
      tags:
        - Companies
      summary: Release a company
      description: >-
        End all of this partner's access to a managed company. The company keeps
        its submitted cases, users, portal access and any credentials of its
        own. Orders this partner created on the company's behalf and never
        submitted are deleted; submitted orders and the company's own drafts
        survive. The company's `external_reference` is cleared so the same
        reference can onboard a fresh company later; the record itself stays
        attributed to the partner for history. Emits `company.access.revoked`
        with `reason: "partner_released"`. Requires an `Idempotency-Key` header
        and the `partner:companies:write` scope. Returns only an id and
        `case_access: unavailable` receipt. The same key replays this receipt; a
        new key after disconnection returns 404.
      operationId: release-a-company
      parameters:
        - description: >-
            Required client-supplied key scoped to the Partner owner, method,
            operation and path. An exact retry replays the original response
            while it is retained, including after credential rotation or
            replacement. Current permissions are required.
          in: header
          name: Idempotency-Key
          required: true
          schema:
            type: string
        - description: UUID of the managed company in this request.
          in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            examples:
              ReleaseCompany:
                summary: Release company
                value:
                  reason: Client ended the partner engagement.
            schema:
              $ref: '#/components/schemas/CompanyReleaseRequest'
      responses:
        '200':
          content:
            application/json:
              examples:
                ReleasedCompany:
                  summary: Released company
                  value:
                    case_access: unavailable
                    id: 12000000-0000-4000-8000-000000000001
              schema:
                $ref: '#/components/schemas/CompanyReleaseReceipt'
          description: ''
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '400':
          content:
            application/json:
              examples:
                validation-error:
                  value:
                    code: validation_error
                    detail: The request contains invalid data.
                    errors:
                      - code: invalid
                        field: users[0].email
                        message: Enter a valid email address.
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '401':
          content:
            application/json:
              examples:
                authentication-error:
                  value:
                    code: not_authenticated
                    detail: Authentication credentials were not provided.
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '404':
          content:
            application/json:
              examples:
                not-found-error:
                  value:
                    code: not_found
                    detail: The requested resource was not found.
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: ''
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            Retry-After:
              description: Integer seconds to wait before retrying a throttled request.
              schema:
                minimum: 1
                type: integer
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
        '500':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Standard error response.
          headers:
            Cache-Control:
              description: >-
                Cacheability directive. Authenticated responses use `private,
                no-store`; the legal-form catalog may use `private,
                max-age=86400`.
              schema:
                type: string
            X-Paywise-Environment:
              description: Environment that produced the response.
              schema:
                enum:
                  - production
                  - sandbox
                type: string
            X-Paywise-Request-Id:
              description: >-
                Fresh server-assigned correlation id for this response.
                Caller-provided request ids are ignored.
              schema:
                format: uuid
                type: string
      security:
        - partnerBearerAuth: []
components:
  schemas:
    CompanyReleaseRequest:
      description: |-
        Body of `POST /partner/v2/companies/{id}/release/`.

        `reason` is validated for shape only: the release event carries the
        fixed machine reason `partner_released` and never free text.
      properties:
        reason:
          description: >-
            Optional single-line note for the partner's own records, up to 5000
            characters. It is not stored on the company and never appears in
            webhook payloads.
          maxLength: 5000
          nullable: true
          type: string
      type: object
    CompanyReleaseReceipt:
      properties:
        case_access:
          allOf:
            - $ref: '#/components/schemas/PartnerReleaseCaseAccessEnum'
          description: >-
            Partner case access after the release: always `unavailable` — the
            company's cases are no longer reachable on behalf of this partner.


            * `unavailable` - unavailable
          readOnly: true
        id:
          description: Identifier of the released company.
          format: uuid
          readOnly: true
          type: string
      required:
        - case_access
        - id
      type: object
    Error:
      properties:
        code:
          description: Machine-readable error category.
          type: string
        detail:
          description: Short human-readable summary of the error.
          type: string
        errors:
          description: Field-level validation errors, when applicable.
          items:
            $ref: '#/components/schemas/ErrorItem'
          type: array
      required:
        - detail
        - code
      type: object
    PartnerReleaseCaseAccessEnum:
      description: '* `unavailable` - unavailable'
      enum:
        - unavailable
      type: string
    ErrorItem:
      properties:
        code:
          description: Machine-readable field error code.
          type: string
        field:
          description: >-
            Path to the field that caused the error, using dots for objects and
            brackets for list indexes, for example `claims[0].amount`; null for
            an error without a field path.
          nullable: true
          type: string
        message:
          description: Human-readable explanation of the field error.
          type: string
      required:
        - field
        - code
        - message
      type: object
  securitySchemes:
    partnerBearerAuth:
      description: >-
        Partner API Bearer key: `Authorization: Bearer <key>`. Keys are created
        only through authorized portal or staff flows.
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.