Ana içeriğe geç

Update Credential Organization

Endpoint

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

Authentication

Requires a Personal API Access Token.

Authorization: Bearer YOUR_TOKEN

Request

Headers

HeaderValueRequired
AuthorizationBearer {token}Yes
Content-Typeapplication/jsonYes

Path Parameters

ParameterTypeRequiredDescription
projectNamestringYesProject name
codestringYesOrganization 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

FieldTypeRequiredDefaultDescription
codestringNo-Ignored for rename; path {code} identifies the organization
nameDefaultstringNo-Primary display name (updated when non-blank)
nameSecondarystringNo-Secondary display name (updated when non-blank)
parentOrganizationCodestringNo-Parent organization code (must exist in the same project)
metadataarray[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

StatusCondition
400Parent organization not found
401Invalid or missing token
404Organization with the given code does not exist in the project
500Unexpected 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 metadata array 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 value in the PUT body.

Permissions

User must have IDENTITY + MANAGE permission in the project.