---
title: "Konnect Organization Lifecycle"
url: "https://nov18-dev.movespot.fyi/apis/konnect-organization-lifecycle-internal-0/versions/ceb69d5d-e7de-4a49-9871-858ce749e2b7"
---

# Konnect Organization Lifecycle

OpenAPI specification document.

```json
{"openapi":"3.0.2","info":{"title":"Konnect Organization Lifecycle","version":"0.0.1","description":"The management API for Konnect Organization Lifecycle.","contact":{"name":"Kong","url":"https://konghq.com"}},"servers":[{"url":"https://global.api.konghq.com/v3","description":"Global Base URL"}],"paths":{"/organizations/state":{"post":{"operationId":"post-organization-state","summary":"Sets a new state for an organization","description":"Sets a new state for an organization and creates an organization state \nhistory record. An organization can be set to active or inactive.\n","requestBody":{"$ref":"#/components/requestBodies/UpdateOrganizationState"},"responses":{"201":{"$ref":"#/components/responses/OrganizationStateResponse"},"400":{"$ref":"#/components/responses/OrganizationStateBadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"},"409":{"$ref":"#/components/responses/OrganizationStateConflict"}},"tags":["Organization Lifecycle"]}},"/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.\nPossible states include active, inactive, deleting, and deleted. An organization state \nwill be transitioned to the deleting state if the organization remains inactive for 90 days. \nAfter deletion is complete, the state will be transitioned to the final deleted state. \n","responses":{"200":{"$ref":"#/components/responses/OrganizationStateHistory"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"}},"tags":["Organization Lifecycle"]}},"/organizations/{organizationId}/deletion-config":{"parameters":[{"name":"organizationId","in":"path","description":"The ID of the organization being patched.","required":true,"schema":{"type":"string","format":"uuid","example":"d32d905a-ed33-46a3-a093-d8f536af9a8a"}}],"patch":{"operationId":"patch-organization-deletion-config","summary":"Update Deletion Config","description":"Sets the deletion configs for a specified organization. The retention period \nis the number of days an organization can remain in the inactive state before \nbeing permanently deleted.\n","requestBody":{"$ref":"#/components/requestBodies/DeletionConfigRequest"},"responses":{"200":{"$ref":"#/components/responses/DeletionConfigResponse"},"400":{"$ref":"#/components/responses/OrganizationStateBadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/OrganizationNotFound"}},"tags":["Organization Lifecycle"]}}},"components":{"schemas":{"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.\n","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"},"DeletionConfig":{"type":"object","properties":{"retention_period_days":{"description":"The retention period in days.","type":"integer","example":90,"maximum":365,"minimum":1}},"title":"Deletion Config"},"BaseError":{"description":"standard error","type":"object","properties":{"status":{"description":"The HTTP status code of the error. Useful when passing the response\nbody to child properties in a frontend UI. Must be returned as an integer.\n","type":"integer","readOnly":true},"title":{"description":"A short, human-readable summary of the problem. It should not\nchange between occurences of a problem, except for localization.\nShould be provided as \"Sentence case\" for direct use in the UI.\n","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\nkong:trace:<correlation_id>. This helps us find the relevant logs\nwhen a customer reports an issue.\n","type":"string","readOnly":true},"detail":{"description":"A human readable explanation specific to this occurence of the problem.\nThis field may contain request/entity data to help the user understand\nwhat went wrong. Enclose variable values in square brackets. Should be\nprovided as \"Sentence case\" for direct use in the UI.\n","type":"string","readOnly":true}},"required":["status","title","instance","detail"],"title":"Error"},"InvalidRules":{"description":"invalid parameters rules","type":"string","enum":["required","is_array","is_base64","is_boolean","is_date_time","is_integer","is_null","is_number","is_object","is_string","is_uuid","is_fqdn","is_arn","unknown_property","missing_reference","is_label","matches_regex","invalid","is_supported_network_availability_zone_list","is_supported_network_cidr_block","is_supported_provider_region","type"],"nullable":true,"readOnly":true},"InvalidParameterStandard":{"type":"object","properties":{"field":{"type":"string","example":"name","readOnly":true},"rule":{"$ref":"#/components/schemas/InvalidRules"},"source":{"type":"string","example":"body"},"reason":{"type":"string","example":"is a required field","readOnly":true}},"additionalProperties":false,"required":["field","reason"]},"InvalidParameterMinimumLength":{"type":"object","properties":{"field":{"type":"string","example":"name","readOnly":true},"rule":{"description":"invalid parameters rules","type":"string","enum":["min_length","min_digits","min_lowercase","min_uppercase","min_symbols","min_items","min"],"nullable":false,"readOnly":true},"minimum":{"type":"integer","example":8},"source":{"type":"string","example":"body"},"reason":{"type":"string","example":"must have at least 8 characters","readOnly":true}},"additionalProperties":false,"required":["field","reason","rule","minimum"]},"InvalidParameterMaximumLength":{"type":"object","properties":{"field":{"type":"string","example":"name","readOnly":true},"rule":{"description":"invalid parameters rules","type":"string","enum":["max_length","max_items","max"],"nullable":false,"readOnly":true},"maximum":{"type":"integer","example":8},"source":{"type":"string","example":"body"},"reason":{"type":"string","example":"must not have more than 8 characters","readOnly":true}},"additionalProperties":false,"required":["field","reason","rule","maximum"]},"InvalidParameterChoiceItem":{"type":"object","properties":{"field":{"type":"string","example":"name","readOnly":true},"rule":{"description":"invalid parameters rules","type":"string","enum":["enum"],"nullable":false,"readOnly":true},"reason":{"type":"string","example":"is a required field","readOnly":true},"choices":{"type":"array","items":{},"minItems":1,"nullable":false,"readOnly":true,"uniqueItems":true},"source":{"type":"string","example":"body"}},"additionalProperties":false,"required":["field","reason","rule","choices"]},"InvalidParameterDependentItem":{"type":"object","properties":{"field":{"type":"string","example":"name","readOnly":true},"rule":{"description":"invalid parameters rules","type":"string","enum":["dependent_fields"],"nullable":true,"readOnly":true},"reason":{"type":"string","example":"is a required field","readOnly":true},"dependents":{"type":"array","items":{},"nullable":true,"readOnly":true,"uniqueItems":true},"source":{"type":"string","example":"body"}},"additionalProperties":false,"required":["field","rule","reason","dependents"]},"InvalidParameters":{"description":"invalid parameters","type":"array","items":{"oneOf":[{"$ref":"#/components/schemas/InvalidParameterStandard"},{"$ref":"#/components/schemas/InvalidParameterMinimumLength"},{"$ref":"#/components/schemas/InvalidParameterMaximumLength"},{"$ref":"#/components/schemas/InvalidParameterChoiceItem"},{"$ref":"#/components/schemas/InvalidParameterDependentItem"}]},"minItems":1,"nullable":false,"uniqueItems":true},"BadRequestError":{"allOf":[{"$ref":"#/components/schemas/BaseError"},{"type":"object","required":["invalid_parameters"],"properties":{"invalid_parameters":{"$ref":"#/components/schemas/InvalidParameters"}}}]},"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"}}}]},"ConflictError":{"allOf":[{"$ref":"#/components/schemas/BaseError"},{"type":"object","properties":{"status":{"example":409},"title":{"example":"Conflict"},"type":{"example":"https://httpstatuses.com/409"},"instance":{"example":"kong:trace:1234567890"},"detail":{"example":"Conflict"}}}]},"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"]},"PaginatedMeta":{"description":"returns the pagination information","type":"object","properties":{"page":{"$ref":"#/components/schemas/PageMeta"}},"required":["page"],"title":"PaginatedMeta"}},"examples":{"400InvalidRequestFormat":{"value":{"status":400,"title":"Bad Request","instance":"konnect:trace:3674017986744198214","invalid_parameters":[{"field":"body","reason":"request format is invalid"}],"detail":"The request format is invalid"}},"404OrganizationStateNotFound":{"value":{"status":404,"title":"Not Found","instance":"konnect:trace:2287285207635123011","detail":"The requested organization was not found"}},"409OrganizationStateConflict":{"value":{"status":409,"title":"Conflict","instance":"konnect:trace:2287285207635123011","detail":"Organization is already set to the requested state"}},"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"}}},"requestBodies":{"UpdateOrganizationState":{"required":true,"description":"The request schema to set an organization's state.","content":{"application/json":{"schema":{"type":"object","properties":{"state":{"description":"The state of the organization to set.","type":"string","example":"inactive","enum":["active","inactive","deleting","deleted"]},"reason":{"description":"The reason for the state change.","type":"string","example":"invoice overdue (30 days)"},"changed_by":{"description":"The uuid of the konger who modified the state.","type":"string","example":"00uerwcs8eC4ifanR256"}},"required":["state"]},"examples":{"Inactive Example":{"value":{"state":"inactive","reason":"invoice overdue (30 days)","changed_by":"00uerwcs8eC4ifanR256"}},"Active Example":{"value":{"state":"active","reason":"organization was created"}}}}}},"DeletionConfigRequest":{"required":true,"description":"The request schema to set an organization's retention period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletionConfig"},"examples":{"Example":{"value":{"retention_period_days":90}}}}}}},"responses":{"OrganizationStateResponse":{"description":"A response for setting the organization state.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationState"},"examples":{"Example":{"value":{"id":"d99c041a-c7cf-46a2-bf3a-44bb5f75400e","state":"active","reason":"invoice overdue (30 days)","service":"kadmin","changed_by":"00uerwcs8eC4ifanR256","created_at":"2023-01-18T11:35:45.130Z"}}}}}},"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"}]}}}}}},"OrganizationStateBadRequest":{"description":"Bad Request","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/BadRequestError"},"examples":{"Request format is invalid":{"$ref":"#/components/examples/400InvalidRequestFormat"}}}}},"OrganizationNotFound":{"description":"Not Found","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/NotFoundError"},"examples":{"Not Found":{"$ref":"#/components/examples/404OrganizationStateNotFound"}}}}},"OrganizationStateConflict":{"description":"Conflict","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/ConflictError"},"examples":{"Conflict":{"$ref":"#/components/examples/409OrganizationStateConflict"}}}}},"DeletionConfigResponse":{"description":"The response schema for setting an organization's retention period.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DeletionConfig"},"examples":{"Example":{"value":{"retention_period_days":90}}}}}},"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"}}}}}}},"tags":[{"name":"Organization Lifecycle"}]}
```
