Update Credential Organization
Endpoint
PUT /apiops/projects/{projectName}/credential-organizations/{code}
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| code | string | Yes | Organization code (cannot be changed) |
Request Body
Full JSON Body Example
{
"code": "team-alpha",
"nameDefault": "Team Alpha (Updated)",
"nameSecondary": "Alpha Ekibi",
"parentOrganizationCode": "root-org",
"metadata": [
{
"key": "costCenter",
"value": "CC-2002",
"secret": false,
"includeInJwt": true,
"includeInTokenResponse": false,
"jwtClaimName": null
}
]
}
Request Body Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| code | string | No | - | Ignored for rename; path {code} identifies the organization |
| nameDefault | string | No | - | Primary display name (updated when non-blank) |
| nameSecondary | string | No | - | Secondary display name (updated when non-blank) |
| parentOrganizationCode | string | No | - | Parent organization code (must exist in the same project) |
| metadata | array[object] | No | - | Replaces the entire metadata list. See Create Credential Organization for the Metadata Object schema |
Response
Success Response (200 OK)
Returns the updated CredentialOrganizationDTO (secret metadata values omitted).
Error Responses
| Status | Condition |
|---|---|
| 400 | Parent organization not found |
| 401 | Invalid or missing token |
| 404 | Organization with the given code does not exist in the project |
| 500 | Unexpected server error |
cURL Example
curl -X PUT \
"https://demo.apinizer.com/apiops/projects/MyProject/credential-organizations/team-alpha" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"nameDefault": "Team Alpha (Updated)", "metadata": []}'
Notes and Warnings
- The organization code cannot be changed via APIops. Create a new organization if you need a different code.
- Metadata is replaced wholesale. The body
metadataarray becomes the new full list; omitting it clears all metadata entries. - Secret metadata is write-only. To update a secret value, include the entry with a non-blank
valuein the PUT body.
Permissions
User must have IDENTITY + MANAGE permission in the project.