---
title: "Get the state history of an organization"
url: "https://nov18-dev.movespot.fyi/apis/konnect-organization-lifecycle-internal-0/versions/ceb69d5d-e7de-4a49-9871-858ce749e2b7/operations/get-organization-state-history"
---

> Full API specification: https://nov18-dev.movespot.fyi/apis/konnect-organization-lifecycle-internal-0/versions/ceb69d5d-e7de-4a49-9871-858ce749e2b7.md

# Get the state history of an organization

`GET` `/organizations/state/history`

Operation ID: `get-organization-state-history`

Returns the state history of an organization sorted in reverse chronological order. Possible states include active, inactive, deleting, and deleted. An organization state will be transitioned to the deleting state if the organization remains inactive for 90 days. After deletion is complete, the state will be transitioned to the final deleted state.

## Responses

- `200` - A paginated list response for a collection of organization state changes.
- `401` - Unauthorized
- `403` - Forbidden
- `404` - Not Found

## OpenAPI definition

```yaml
openapi: 3.0.2
info:
  title: Konnect Organization Lifecycle
  version: 0.0.1
servers:
  - url: https://global.api.konghq.com/v3
    description: Global Base URL
paths:
  /organizations/state/history:
    get:
      operationId: get-organization-state-history
      summary: Get the state history of an organization
      description: >
        Returns the state history of an organization sorted in reverse
        chronological order.

        Possible states include active, inactive, deleting, and deleted. An
        organization state 

        will be transitioned to the deleting state if the organization remains
        inactive for 90 days. 

        After deletion is complete, the state will be transitioned to the final
        deleted state. 
      responses:
        "200":
          $ref: "#/components/responses/OrganizationStateHistory"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "403":
          $ref: "#/components/responses/Forbidden"
        "404":
          $ref: "#/components/responses/OrganizationNotFound"
      tags:
        - Organization Lifecycle
components:
  responses:
    OrganizationStateHistory:
      description: A paginated list response for a collection of organization state changes.
      content:
        application/json:
          schema:
            type: object
            properties:
              meta:
                $ref: "#/components/schemas/PaginatedMeta"
              data:
                type: array
                items:
                  $ref: "#/components/schemas/OrganizationState"
            title: Organizations State History.
          examples:
            Example:
              value:
                meta:
                  page:
                    number: 1
                    size: 2
                    total: 2
                data:
                  - id: 7f9fd312-a987-4628-b4c5-bb4f4fddd5f7
                    state: inactive
                    service: kadmin
                    reason: invoice overdue (30 days)
                    changed_by: 00uerwcs8eC4ifanR256
                    created_at: 2022-09-25T13:00:00.00Z
                  - id: 7f9fd312-a987-4628-b4c5-bb4f4fddd5f8
                    state: active
                    service: kauth
                    created_at: 2021-09-25T13:00:00.00Z
    Unauthorized:
      description: Unauthorized
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/UnauthorizedError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/UnauthorizedExample"
    Forbidden:
      description: Forbidden
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/ForbiddenError"
          examples:
            UnauthorizedExample:
              $ref: "#/components/examples/ForbiddenExample"
    OrganizationNotFound:
      description: Not Found
      content:
        application/problem+json:
          schema:
            $ref: "#/components/schemas/NotFoundError"
          examples:
            Not Found:
              $ref: "#/components/examples/404OrganizationStateNotFound"
  schemas:
    PaginatedMeta:
      description: returns the pagination information
      type: object
      properties:
        page:
          $ref: "#/components/schemas/PageMeta"
      required:
        - page
      title: PaginatedMeta
    OrganizationState:
      type: object
      properties:
        id:
          description: UUID of the organization.
          type: string
          format: uuid
          example: d99c041a-c7cf-46a2-bf3a-44bb5f75400e
          readOnly: true
        state:
          description: State of the organization.
          type: string
          example: active
          enum:
            - active
            - inactive
            - deleting
            - deleted
        reason:
          description: The reason for the organization's state.
          type: string
          example: invoice overdue (30 days)
        service:
          description: The service that modified the state.
          type: string
          example: kbilling
        changed_by:
          description: |
            The ID of the Konger who modified the state.
          type: string
          example: 00uerwcs8eC4ifanR256
        created_at:
          description: Date the organization state was created.
          type: string
          format: date-time
          example: 2023-01-23T17:22:52.150Z
          readOnly: true
      title: Organization State
    UnauthorizedError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 401
            title:
              example: Unauthorized
            type:
              example: https://httpstatuses.com/401
            instance:
              example: kong:trace:1234567890
            detail:
              example: Invalid credentials
    ForbiddenError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 403
            title:
              example: Forbidden
            type:
              example: https://httpstatuses.com/403
            instance:
              example: kong:trace:1234567890
            detail:
              example: Forbidden
    NotFoundError:
      allOf:
        - $ref: "#/components/schemas/BaseError"
        - type: object
          properties:
            status:
              example: 404
            title:
              example: Not Found
            type:
              example: https://httpstatuses.com/404
            instance:
              example: kong:trace:1234567890
            detail:
              example: Not found
    PageMeta:
      description: Contains pagination query parameters and the total number of
        objects returned.
      type: object
      properties:
        number:
          type: number
          example: 1
        size:
          type: number
          example: 10
        total:
          type: number
          example: 100
      required:
        - number
        - size
        - total
    BaseError:
      description: standard error
      type: object
      properties:
        status:
          description: >
            The HTTP status code of the error. Useful when passing the response

            body to child properties in a frontend UI. Must be returned as an
            integer.
          type: integer
          readOnly: true
        title:
          description: |
            A short, human-readable summary of the problem. It should not
            change between occurences of a problem, except for localization.
            Should be provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
        type:
          description: The error type.
          type: string
          readOnly: true
        instance:
          description: |
            Used to return the correlation ID back to the user, in the format
            kong:trace:<correlation_id>. This helps us find the relevant logs
            when a customer reports an issue.
          type: string
          readOnly: true
        detail:
          description: >
            A human readable explanation specific to this occurence of the
            problem.

            This field may contain request/entity data to help the user
            understand

            what went wrong. Enclose variable values in square brackets. Should
            be

            provided as "Sentence case" for direct use in the UI.
          type: string
          readOnly: true
      required:
        - status
        - title
        - instance
        - detail
      title: Error
  examples:
    UnauthorizedExample:
      value:
        status: 401
        title: Unauthorized
        instance: kong:trace:8347343766220159418
        detail: Unauthorized
    ForbiddenExample:
      value:
        status: 403
        title: Forbidden
        instance: kong:trace:2723154947768991354
        detail: You do not have permission to perform this action
    404OrganizationStateNotFound:
      value:
        status: 404
        title: Not Found
        instance: konnect:trace:2287285207635123011
        detail: The requested organization was not found
```
