PATCH
/user/v1/organizations/{organizationId}
Update an organization
Updates specified organization.
path parameters
organizationId
string
RequiredThe identifier of the organization.
body parameters
The client defined unique identifier of the organization account.
It is restricted to letters, numbers, underscores, and hyphens, with the first character a letter or a number, and a 255 character maximum.
ID's starting with org_
are reserved.
The human-readable display name of the organization.
The maximum length is 200 characters.
The email address of the organization.
The maximum length is 320 characters.
The flow identifier associated with the creation of the organization.
The flow type must be SIGNUP
and associated with the user creating the organization.
Returns
The system-assigned identifier of the organization.
The client defined unique identifier of the organization account.
The human-readable display name of the organization.
The email address of the organization.
Whether the organization's email address has been verified.
The photo/avatar URL of the organization.
The number of members in the organization.
This includes disabled users, but does not include user's marked for deletion.
Whether the organization is disabled.
The general error code (e.g. INVALID_ARGUMENT
).
Possible values:OK
CANCELLED
UNKNOWN
INVALID_ARGUMENT
DEADLINE_EXCEEDED
NOT_FOUND
ALREADY_EXISTS
PERMISSION_DENIED
UNAUTHENTICATED
RESOURCE_EXHAUSTED
FAILED_PRECONDITION
ABORTED
OUT_OF_RANGE
UNIMPLEMENTED
INTERNAL
UNAVAILABLE
DATA_LOSS
A developer-facing error message.
A reason code for the error (e.g. USER_PENDING_DELETION
).
The parameter path related to the error (e.g. member.userId
).
Additional metadata related to the error.
A user-facing error message.
curl https://api.userhub.com/user/v1/organizations/org_28seyVGVL1got6 \
-H "UserHub-Api-Key: $USERHUB_USER_KEY" \
-H "Authorization: Bearer $USER_ACCESS_TOKEN" \
-X PATCH \
--json '{
"displayName": "Stark Industries"
}'
const res = await userApi.organizations.update(
"org_28seyVGVL1got6",
{
displayName: "Stark Industries",
},
);
res, err := userApi.Organizations().Update(
context.Background(),
"org_28seyVGVL1got6",
&userapi.OrganizationUpdateInput{
DisplayName: "Stark Industries",
},
)
$res = $userApi->organizations->update(
organizationId: 'org_28seyVGVL1got6',
displayName: 'Stark Industries',
);
res = user_api.organizations.update(
organization_id="org_28seyVGVL1got6",
display_name="Stark Industries",
)
Response bodyJSON
{
"id": "org_28seyVGVL1got6",
"displayName": "Stark Industries",
"email": "[email protected]",
"emailVerified": true,
"imageUrl": "https://example.com/acme.jpg",
"memberCount": 1
}