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

# End a party

> Ends a legal entity's part in a project; ending an operator needs the controller's approval.



## OpenAPI

````yaml openapi/en/control.json POST /v1/projects/{project_id}/parties/{party_id}/end
openapi: 3.1.0
info:
  title: Niadra control API
  version: '1'
  description: >-
    Tenants, projects, sources, keys, people, configuration and usage. It never
    receives customer content.
servers:
  - url: https://control.api.niadra.com
security: []
paths:
  /v1/projects/{project_id}/parties/{party_id}/end:
    post:
      tags:
        - accounts
      summary: End a party
      description: >-
        Ends a legal entity's part in a project; ending an operator of a project
        whose controller is not the tenant waits for the controller's approval
        of `end:<party id>`.


        **Authentication.** Person token issued by the control plane
        (`Authorization: Bearer <JWT>`), with the role the operation needs.
      operationId: end_party_v1_projects__project_id__parties__party_id__end_post
      parameters:
        - in: path
          name: project_id
          required: true
          schema:
            format: uuid
            title: Project Id
            type: string
        - in: path
          name: party_id
          required: true
          schema:
            format: uuid
            title: Party Id
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Party'
          description: Successful Response
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
          description: The request does not match the contract.
      security:
        - personToken: []
components:
  schemas:
    Party:
      additionalProperties: false
      properties:
        entity_id:
          format: uuid
          title: Entity Id
          type: string
        entity_name:
          title: Entity Name
          type: string
        party_id:
          format: uuid
          title: Party Id
          type: string
        role:
          enum:
            - controller
            - operator
            - sub_operator
          title: Role
          type: string
        since:
          format: date-time
          title: Since
          type: string
        status:
          enum:
            - active
            - ended
          title: Status
          type: string
        tenant_id:
          anyOf:
            - format: uuid
              type: string
            - type: 'null'
          title: Tenant Id
        until:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Until
      required:
        - party_id
        - entity_id
        - entity_name
        - role
        - since
        - status
      title: Party
      type: object
    Problem:
      additionalProperties: false
      description: RFC 9457 problem details; `code` comes from the versioned error catalog.
      properties:
        code:
          title: Code
          type: string
        detail:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Detail
        request_id:
          anyOf:
            - type: string
            - type: 'null'
          default: null
          title: Request Id
        status:
          title: Status
          type: integer
        title:
          title: Title
          type: string
        type:
          default: about:blank
          title: Type
          type: string
      required:
        - title
        - status
        - code
      title: Problem
      type: object
  securitySchemes:
    personToken:
      type: http
      scheme: bearer
      bearerFormat: JWT

````