Ana içeriğe geç

Delete Credential Organization

Endpoint

DELETE /apiops/projects/{projectName}/credential-organizations/{code}

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
codestringYesOrganization code

Response

Success Response (204 No Content)

The organization is deleted. No response body is returned.

An organization is only deletable while nothing references it. Move or remove its sub-organizations, credentials, portal applications and portal accounts first; otherwise the request is refused with 409 and the organization is left untouched. An organization managed by directory synchronization cannot be deleted through this endpoint at all, regardless of what is attached to it — it is retired only by its own provider's synchronization run.

Error Responses

StatusCondition
400The organization is managed by directory synchronization (ldapManaged)
401Invalid or missing token
404Organization with the given code does not exist in the project
409Organization still has sub-organizations, consumers, applications or accounts attached (credentialOrganizationHasDependents), or a delete is already in progress for it (deleteInProgress)
500Unexpected server error

Error Response Body

Every non-2xx response other than 404 carries the same shape:

{
"type": "https://apinizer.com/problem-with-message",
"title": "Bad Request",
"status": 400,
"detail": "LDAP-managed credential organization cannot be deleted manually; use directory sync.",
"path": "/apiops/projects/MyProject/credential-organizations/team-alpha",
"message": "error.ldapManaged",
"params": "credentialOrganization"
}

message is the stable, machine-readable field to branch on (error.ldapManaged, error.credentialOrganizationHasDependents, error.deleteInProgress); detail is a human-readable sentence that may be reworded between versions. On a 409 for credentialOrganizationHasDependents, detail states only that dependent records exist — it does not say which category (sub-organizations, credentials, applications, or accounts) or how many; check the organization's own detail screens, or the corresponding list endpoints filtered by organizationId, to find out what is actually attached.

If a delete for the same organization is already in progress, retry once it finishes; a response that keeps recurring long after nothing is actually deleting the organization is described in Concurrent Deletion.

cURL Example

curl -X DELETE \
"https://demo.apinizer.com/apiops/projects/MyProject/credential-organizations/team-alpha" \
-H "Authorization: Bearer YOUR_TOKEN"

Permissions

User must have IDENTITY + MANAGE permission in the project.