/api/v1/organizations/{organization}
Update organization settings
Update the token's organization name, login provider, or two-factor requirement.
Last updated
Request
PATCH / PUT /api/v1/organizations/{organization}
Requires organizations:update. Supplying social_provider or require_2fa additionally requires organizations:security, even when the value is unchanged. See token permissions.
Send Authorization: Bearer YOUR_API_TOKEN, Accept: application/json, Content-Type: application/json, and a required Idempotency-Key. See idempotency and retries.
organization must be the numeric ID returned by Read organization settings for this token.
Query parameters
This endpoint does not use query parameters.
Request body
| Field | Type | Usage |
|---|---|---|
name |
string | Optional; nonempty when supplied, up to 255 characters. |
social_provider |
string | Optional. password, google, or microsoft. Requires the additional security permission. |
require_2fa |
boolean | Optional. Allowed only when the resulting provider is password. Requires the additional security permission. |
PATCH and PUT update only supplied fields. Supply at least one writable field. Empty updates and unsupported fields return 422.
Example
curl --request PATCH "https://my.assetcenter.app/api/v1/organizations/42" \
--header "Authorization: Bearer $ASSETCENTER_API_TOKEN" \
--header "Accept: application/json" \
--header "Content-Type: application/json" \
--header "Idempotency-Key: e77330e7-7584-476d-9d37-9c410c9861ec" \
--data '{"name":"Example Organization","require_2fa":true}'
This example requires both organizations:update and organizations:security.
Response
200 OK, with the complete updated settings:
{
"data": {
"id": 42,
"name": "Example Organization",
"image_url": null,
"has_photo": false,
"social_provider": "password",
"require_2fa": true,
"can_create": false,
"can_delete": true
}
}
Behavior and constraints
Changing the login provider checks every member's email address. Google rejects outlook.com, hotmail.com, live.com, msn.com, hotmail.co.uk, and live.co.uk. Microsoft rejects those domains plus gmail.com and googlemail.com. Incompatible addresses return 422 on social_provider; update them before retrying.
Supplying require_2fa when the resulting provider is Google or Microsoft returns 422 on require_2fa, because that provider manages two-factor authentication. A validation failure leaves all settings unchanged.
Errors
401 means invalid authentication; 403 means missing permissions or administrator access. A different organization's ID returns 404, including another organization administered by the token creator. Invalid or unsupported input and missing keys return 422; conflicting key reuse returns 409; throttling returns 429. See error handling and rate limits.