Skip to main content
PATCH
/
orgs
/
{org_id}
/
orgs
/
{sub_org_id}
Update Sub-Organization Features
curl --request PATCH \
  --url https://api.useinvent.com/orgs/{org_id}/orgs/{sub_org_id} \
  --header 'Content-Type: application/json' \
  --data '
{
  "features": {
    "allow_overdraft": true,
    "workflows": true,
    "broadcasts": true,
    "enable_japifon": true
  }
}
'
{
  "id": "<string>",
  "name": "<string>",
  "logo_url": "<string>",
  "plan": "free",
  "balance": 123,
  "promo_balance": 123,
  "billing": {
    "auto_recharge": {
      "enabled": true,
      "recharge_threshold": 252.5,
      "recharge_amount": 252.5
    },
    "spending_cap": {
      "enabled": true,
      "amount": 50000,
      "reset_at": "2023-11-07T05:31:56Z"
    },
    "payment_method": {
      "type": "<string>",
      "payment_method_id": "<string>",
      "brand": "<string>",
      "last4": "<string>",
      "inactive": true,
      "failed_at": "2023-11-07T05:31:56Z",
      "failed_message": "<string>"
    },
    "last_low_balance_notification_at": "2023-11-07T05:31:56Z",
    "last_out_of_balance_notification_at": "2023-11-07T05:31:56Z",
    "last_spending_cap_notification_at": "2023-11-07T05:31:56Z"
  },
  "members": [
    {
      "id": "<string>",
      "name": "<string>",
      "email": "jsmith@example.com",
      "avatar": "<string>",
      "role": "ADMIN",
      "status": "ACTIVE",
      "org_id": "<string>",
      "user_id": "<string>",
      "preferences": {
        "notifications": {
          "assigned_to_me": {
            "enabled": true,
            "notified_at": "2023-11-07T05:31:56Z"
          }
        }
      },
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "seen_at": "2023-11-07T05:31:56Z"
    }
  ],
  "spending_cap_used": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "features": {
    "enterprise": true,
    "allow_overdraft": true,
    "workflows": true,
    "broadcasts": true,
    "enable_japifon": true,
    "custom_domain": true,
    "slack_access": true
  }
}

Path Parameters

org_id
string
required

The ID of the parent organization

sub_org_id
string
required

The ID of the sub-organization

Body

Schema for updating a sub-organization from the parent

features
object

Delegatable features configuration for sub-orgs

Response

200 - application/json

The updated sub-organization with its plan, balance, members, and features.

Summary information about a sub-organization

id
string
required

Unique identifier of the sub-organization

name
string
required

Name of the sub-organization

logo_url
string | null
required

URL of the sub-organization logo

plan
enum<string>
required

Type of subscription plan

Available options:
free,
business
balance
number
required

Current credit balance

promo_balance
number
required

Current promotional credit balance

billing
object
required

Schema for updating payment configuration

members
object[]
required

Members of the sub-organization

spending_cap_used
number
required

Amount spent in the current month

created_at
string<date-time> | null
required

Timestamp when the sub-organization was created

features
object

Org gate-keeping features configuration