API Documentation
Authentication
Account
Content Generation
Repository Management
Repository Manipulation
Repository Commit Manipulation
Repository Workspace Manipulation
- GETList workspaces
- POSTCreate a workspace
- GETGet workspace details
- DELDelete workspace
- POSTUpdate workspace name
- POSTCheckout workspace ref
- GETWorkspace status
- POSTReset changes in workspace
- POSTMerge base branch into workspace
- GETGet workspace preferences
- PUTUpdate workspace preferences
- GETOther workspace statuses
Repository Branch Manipulation
Repository Tag Manipulation
Repository Shelves Manipulation
File Mutation
Repository Merge Manipulation
Collaborators
Repository Content Comparison
Organization Management
- GETList user's organizations
- POSTCreate organization
- GETGet organization details
- PATCHRename organization
- GETList organization repositories
- GETList organization members
- GETGet organization member details
- DELDelete a member from the organization
- GETList accessible repos
- POSTInvite a new member to the organization
- PATCHChange an organization member's role
- POSTLeave organization
- GETList organization subscription information
User Management
Organization Management
Rename organization
Change the name of an organization. Only admins can perform this action.
PATCH
/
organizations
/
{org_id}
Copy
Ask AI
curl --request PATCH \
--url https://api.diversion.dev/v0/organizations/{org_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "New Organization Name"
}'
Copy
Ask AI
{
"id": "org_123456",
"name": "Example Organization",
"description": "This is an example organization.",
"owner_id": "user_123456",
"total_storage": 1000000,
"members": [
{
"id": "member_123456",
"user_id": "user_123456",
"organization_id": "org_123456",
"role": "READ"
}
],
"invites": [
{
"id": "invite_123456",
"organization_id": "org_123456",
"inviting_user_id": "user_123456",
"invited_email": "jsmith@example.com",
"status": "PENDING",
"created": "2023-01-01T00:00:00Z",
"expires": "2023-01-31T00:00:00Z"
}
],
"in_warning_group": true
}
Authorizations
This API uses OAuth 2 with the implicit grant flow
Path Parameters
An ID of an organization
Body
application/json
Response
200
application/json
Organization renamed successfully
The response is of type object
.
Copy
Ask AI
curl --request PATCH \
--url https://api.diversion.dev/v0/organizations/{org_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"name": "New Organization Name"
}'
Copy
Ask AI
{
"id": "org_123456",
"name": "Example Organization",
"description": "This is an example organization.",
"owner_id": "user_123456",
"total_storage": 1000000,
"members": [
{
"id": "member_123456",
"user_id": "user_123456",
"organization_id": "org_123456",
"role": "READ"
}
],
"invites": [
{
"id": "invite_123456",
"organization_id": "org_123456",
"inviting_user_id": "user_123456",
"invited_email": "jsmith@example.com",
"status": "PENDING",
"created": "2023-01-01T00:00:00Z",
"expires": "2023-01-31T00:00:00Z"
}
],
"in_warning_group": true
}
Assistant
Responses are generated using AI and may contain mistakes.