put__organization_{orgId}
PUT /organization/{orgId}
Update Organization Details
Update organization details and settings. This endpoint requires ADMINISTRATOR or OWNER role permissions. Only the fields provided in the request body will be updated. Users can only modify their own organization.
TypeScript Client Library
// Note: This endpoint doesn't have a direct client method in the provided TypeScript client
// You would need to use the generic makeRequest method:
// this.makeRequest<any>(`organization/${orgId}`, 'PUT', {
// name: 'Updated Organization Name',
// address1: '456 New Business Ave',
// city: 'Los Angeles',
// state: 'CA',
// mfaEnforced: true
// });
Code Samples
# You can also use wget
curl -X PUT https://backend.flashback.tech/organization/123e4567-e89b-12d3-a456-426614174000 \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer {access-token}' \
-d '{
"name": "Updated Organization Name",
"address1": "456 New Business Ave",
"city": "Los Angeles",
"state": "CA",
"mfaEnforced": true
}'
Example responses
200 Response
{
"success": true,
"data": {
"id": "123e4567-e89b-12d3-a456-426614174000",
"name": "Updated Organization Name",
"domain": "acme.com",
"address1": "456 New Business Ave",
"address2": "Suite 100",
"city": "Los Angeles",
"zipcode": "10001",
"phone": "+1-555-0123",
"state": "CA",
"country": "US",
"deletedAt": null,
"reposDisabled": false,
"website": "https://acme.com",
"is_business": true,
"mfaEnforced": true
},
"message": "Organization updated successfully"
}
400 Response
{
"success": false,
"data": null,
"message": "No valid fields to update"
}
403 Response
{
"success": false,
"data": null,
"message": "Insufficient permissions: only OWNER and ADMINISTRATOR roles can modify organization"
}
404 Response
{
"success": false,
"data": null,
"message": "Organization not found"
}
500 Response
{
"success": false,
"data": null,
"message": "Internal server error"
}
Path Parameters
» orgId
string
true
Unique identifier of the organization to update
Request Body
» name
string
false
none
Organization name
» address1
string
false
none
Primary address line
» address2
string
false
none
Secondary address line
» city
string
false
none
City
» zipcode
string
false
none
ZIP/Postal code
» phone
string
false
none
Phone number
» state
string
false
none
State/Province
» country
string
false
none
Country
» is_business
boolean
false
none
Whether this is a business organization
» mfaEnforced
boolean
false
none
Whether multi-factor authentication is enforced
Responses
Response Schema
Status Code 200
» success
boolean
false
none
Indicates if the request was successful
» data
object
false
none
Updated organization data
»» id
string
false
none
Unique identifier for the organization
»» name
string
false
none
Organization name
»» domain
string
false
none
Organization domain
»» address1
string
false
none
Primary address line
»» address2
string
false
none
Secondary address line
»» city
string
false
none
City
»» zipcode
string
false
none
ZIP/Postal code
»» phone
string
false
none
Phone number
»» state
string
false
none
State/Province
»» country
string
false
none
Country
»» deletedAt
string (date-time)
false
none
Deletion timestamp (null if active)
»» reposDisabled
boolean
false
none
Whether repositories are disabled
»» website
string
false
none
Organization website URL
»» is_business
boolean
false
none
Whether this is a business organization
»» mfaEnforced
boolean
false
none
Whether multi-factor authentication is enforced
» message
string
false
none
Success message
Status Code 400
» success
boolean
false
none
Indicates if the request was successful
» data
null
false
none
No data returned
» message
string
false
none
Error message describing the validation issue
Status Code 403
» success
boolean
false
none
Indicates if the request was successful
» data
null
false
none
No data returned
» message
string
false
none
Error message describing the permission issue
Status Code 404
» success
boolean
false
none
Indicates if the request was successful
» data
null
false
none
No data returned
» message
string
false
none
Error message describing the issue
Status Code 500
» success
boolean
false
none
Indicates if the request was successful
» data
null
false
none
No data returned
» message
string
false
none
Error message describing the server issue
Security
BearerAuth: Bearer token authentication required
Organization Access: User must be a member of the specified organization
Role Requirements: Requires ADMINISTRATOR or OWNER role to modify organization settings
Notes
Only the fields provided in the request body will be updated
Undefined values in the request body are filtered out and not processed
Users can only modify their own organization's details
The
domain
,deletedAt
,reposDisabled
, andwebsite
fields cannot be modified through this endpointOrganization settings are excluded from both request and response as requested
At least one valid field must be provided in the request body
Last updated
Was this helpful?