Ana içeriğe geç

Create Credential Organization

Deprecated

This operation is deprecated. It still works. Use the successor operation of the Consumer Organizations API instead.

Every response of this operation carries a Deprecation: @1792368000 header and a Link header whose rel is successor-version:

Link: </apiops/projects/{projectName}/consumer-organizations>; rel="successor-version"

Endpoint​

POST /apiops/projects/{projectName}/credential-organizations/

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

Request Body​

Full JSON Body Example​

{
"code": "team-alpha",
"nameDefault": "Team Alpha",
"nameSecondary": "Alpha Ekibi",
"parentOrganizationCode": "root-org",
"metadata": [
{
"key": "costCenter",
"value": "CC-1001",
"secret": false,
"includeInJwt": true,
"includeInTokenResponse": false,
"jwtClaimName": null
}
]
}

Request Body Fields​

FieldTypeRequiredDefaultDescription
codestringYes-Stable public identifier (unique within the project)
nameDefaultstringNo-Primary display name
nameSecondarystringNo-Secondary display name
parentOrganizationCodestringNo-Parent organization code (must exist in the same project)
metadataarray[object]No[]Custom metadata entries. See Metadata Object below

Metadata Object​

FieldTypeRequiredDefaultDescription
keystringYes-Metadata key
valuestringNo-Metadata value. Secret entries are write-only on GET
secretbooleanNofalseWhen true, the value is not returned on GET
includeInJwtbooleanNofalseInclude this entry in issued JWT access tokens
includeInTokenResponsebooleanNofalseInclude this entry in token endpoint JSON responses
jwtClaimNamestring|nullNonullOverride JWT claim name; defaults to key when null

Response​

Success Response (201 Created)​

Returns the created CredentialOrganizationDTO. Secret metadata values are omitted from the response body.

{
"code": "team-alpha",
"nameDefault": "Team Alpha",
"nameSecondary": "Alpha Ekibi",
"parentOrganizationCode": "root-org",
"metadata": [
{
"key": "costCenter",
"value": "CC-1001",
"secret": false,
"includeInJwt": true,
"includeInTokenResponse": false,
"jwtClaimName": null
}
]
}

Error Responses​

StatusCondition
400Blank code, or parent organization not found
401Invalid or missing token
409An organization with the same code already exists in the project
500Unexpected server error

cURL Example​

curl -X POST \
"https://demo.apinizer.com/apiops/projects/MyProject/credential-organizations/" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"code": "team-alpha", "nameDefault": "Team Alpha", "metadata": []}'

Notes and Warnings​

  • code is immutable. After creation, the organization is always addressed by code in path parameters.
  • Metadata replaces the full list on update. On POST, an empty or omitted metadata array creates the organization with no metadata entries.
  • Secret metadata is write-only. Values marked secret: true are never returned on GET; supply the value again on POST/PUT to set or change it.
  • Limits are not part of the organization body. An organization no longer carries default limit plans, and a defaultLimitPlans field in the body is ignored. Apply a limit plan to the organization from its Limits tab (with Counted As set to Each API client, Each consumer or Each sub-organization to cover the identities under it), or through the Limit Assignments Management API.

Permissions​

User must have IDENTITY + MANAGE permission in the project.