Billing

Gets the usage of a workspace

get

Get the usage data for a workspace

Path parameters
workspace_idstring · uuidRequired

The ID of the workspace to get usage data for

Responses
200

The usage of the workspace

application/json
Responseany of
or
nullOptional
get
GET /billing/{workspace_id}/workspace-usage HTTP/1.1
Host: 
Accept: */*
{
  "seats": {
    "used": 1,
    "included": 1,
    "enforced": true
  },
  "guests": {
    "used": 1,
    "included": 1,
    "enforced": true
  },
  "has_payment_method": true,
  "cloud_storage": {
    "free": 1,
    "paid": 1,
    "used": 1
  },
  "byo_storage": {
    "free": 1,
    "paid": 1,
    "used": 1
  },
  "vault_storage": {
    "free": 1,
    "paid": 1,
    "used": 1
  },
  "drives": {
    "used": 1,
    "included": 1,
    "enforced": true
  },
  "ai_indexed_items": {
    "used": 1,
    "included": 1,
    "enforced": true
  },
  "cloud_drives": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "usage": 1
    }
  ],
  "byo_drives": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "usage": 1
    }
  ],
  "vault_drives": [
    {
      "id": "123e4567-e89b-12d3-a456-426614174000",
      "name": "text",
      "usage": 1
    }
  ],
  "monthly_subscription_status": "text",
  "annual_subscription_status": "text",
  "credits": 1
}

Gets the usage of a drive

get

Get the usage data for a drive

Path parameters
drive_idstring · uuidRequired

The ID of the drive to get usage data for

Responses
200

The usage of the drive

application/json
get
GET /billing/{drive_id}/drive-usage HTTP/1.1
Host: 
Accept: */*
{
  "types": [
    {
      "type": "IMAGE",
      "count": 1,
      "size": 1
    }
  ],
  "usage": 1,
  "total_storage": 1,
  "total_items": 1
}

Gets the usage of a workspace

get

Get the usage data for a workspace

Path parameters
workspace_idstring · uuidRequired

The ID of the workspace to get usage data for

Responses
200

The usage of the workspace

application/json
Responseany of
or
nullOptional
get
GET /billing/{workspace_id}/usage HTTP/1.1
Host: 
Accept: */*
{
  "billing": {
    "start_time": 1,
    "end_time": 1,
    "total_cloud_paid": 1,
    "total_vault_paid": 1,
    "total_byo_paid": 1,
    "total_cloud_free": 1,
    "total_vault_free": 1,
    "total_byo_free": 1,
    "cloud_overage": 1,
    "byo_overage": 1,
    "vault_storage_overage": 1
  },
  "plan": "text",
  "plan_name": "text",
  "seats_annual": true,
  "is_trial": true,
  "seats": 1
}

Gets the invoices for a workspace

get

Get the invoices for a workspace

Path parameters
workspace_idstring · uuidRequired

The ID of the workspace to get invoices for

Query parameters
upcomingbooleanOptional

Whether to get the upcoming invoice

Default: false
Responses
200

The invoices of the workspace

application/json
Responseany of
or
nullOptional
get
GET /billing/{workspace_id}/invoices HTTP/1.1
Host: 
Accept: */*
[
  {
    "total_amount_due": 1,
    "period_start": 1,
    "period_end": 1,
    "invoice_date": 1,
    "paid": true,
    "invoice_pdf": "text",
    "hosted_invoice_url": "text",
    "tax": 1,
    "subtotal": 1,
    "lines": [
      {
        "description": "text",
        "amount": 1,
        "quantity": 1,
        "unit_type": "text",
        "unit_amount": 1
      }
    ],
    "status": "text",
    "currency": "text"
  }
]

Update Payment Method

put

Update the payment method for a workspace

Path parameters
workspace_idstring · uuidRequired

The ID of the workspace to update the payment method for

Body
payment_method_idstringRequired

The ID of the payment method to update to

is_firstany ofOptional

Whether this is the first added payment method (not updated later on)

Default: false
booleanOptional
or
nullOptional
Responses
200

Successful Response

application/json
Responseany
put
PUT /billing/{workspace_id}/payment-method HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 45

{
  "payment_method_id": "text",
  "is_first": false
}

No content

Update Billing Address

put

Update the billing address for a workspace

Path parameters
workspace_idstring · uuidRequired

The ID of the workspace to update the billing address for

Body
payment_method_idstringRequired

The ID of the payment method to update to

Responses
200

Successful Response

application/json
Responseany
put
PUT /billing/{workspace_id}/billing-address HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 178

{
  "address": {
    "name": "text",
    "phone": "text",
    "address": {
      "line1": "text",
      "line2": "text",
      "city": "text",
      "state": "text",
      "postal_code": "text",
      "country": "text"
    }
  },
  "payment_method_id": "text"
}

No content

Get Payment Methods

get

Get the payment methods for a workspace

Path parameters
workspace_idstring · uuidRequired

The ID of the workspace to get the payment methods for

Responses
200

Successful Response

application/json
get
GET /billing/{workspace_id}/payment-methods HTTP/1.1
Host: 
Accept: */*
[
  {
    "id": "text",
    "brand": "text",
    "type": "text",
    "last4": "text",
    "exp_month": 1,
    "exp_year": 1,
    "funding": "text",
    "country": "text",
    "address": "text",
    "city": "text",
    "state": "text",
    "zip": "text",
    "name": "text"
  }
]

Update Plan

put

Update the plan for a workspace

Path parameters
workspace_idstring · uuidRequired

The ID of the workspace to update the plan for

Query parameters
price_idstringRequired

The ID of the price plan to update to

seatsany ofOptional

The number of seats to update to

integerOptional
or
nullOptional
Responses
200

Successful Response

application/json
Responseany
put
PUT /billing/{workspace_id}/plan?price_id=text HTTP/1.1
Host: 
Accept: */*

No content

Get Current Invoice

get

Get the current invoice for a workspace

Path parameters
workspace_idstring · uuidRequired

The ID of the workspace to get the current invoice for

Responses
200

Successful Response

application/json
get
GET /billing/{workspace_id}/current-invoice HTTP/1.1
Host: 
Accept: */*
{
  "total_amount_due": 1,
  "period_start": 1,
  "period_end": 1,
  "invoice_date": 1,
  "paid": true,
  "invoice_pdf": "text",
  "hosted_invoice_url": "text",
  "tax": 1,
  "subtotal": 1,
  "lines": [
    {
      "description": "text",
      "amount": 1,
      "quantity": 1,
      "unit_type": "text",
      "unit_amount": 1
    }
  ],
  "status": "text",
  "currency": "text"
}

Get Upcoming Monthly Invoice

get

Get the upcoming monthly invoice for a workspace

Path parameters
workspace_idstring · uuidRequired

The ID of the workspace to get the upcoming monthly invoice for

Responses
200

Successful Response

application/json
get
GET /billing/{workspace_id}/upcoming-monthly-invoice HTTP/1.1
Host: 
Accept: */*
{
  "total_amount_due": 1,
  "period_start": 1,
  "period_end": 1,
  "invoice_date": 1,
  "paid": true,
  "invoice_pdf": "text",
  "hosted_invoice_url": "text",
  "tax": 1,
  "subtotal": 1,
  "lines": [
    {
      "description": "text",
      "amount": 1,
      "quantity": 1,
      "unit_type": "text",
      "unit_amount": 1
    }
  ],
  "status": "text",
  "currency": "text"
}

Get Annual Subscriptions

get

Get the annual subscriptions for a workspace

Path parameters
workspace_idstring · uuidRequired

The ID of the workspace to get the annual subscriptions for

Responses
200

Successful Response

application/json
Responseany
get
GET /billing/{workspace_id}/annual-subscriptions HTTP/1.1
Host: 
Accept: */*

No content

Update Billing Email

put

Update the billing email for a workspace

Path parameters
workspace_idstring · uuidRequired

The ID of the workspace to update the billing email for

Body
emailstringRequired

The email to update the billing email to

Responses
200

Successful Response

application/json
Responseany
put
PUT /billing/{workspace_id}/billing-email HTTP/1.1
Host: 
Content-Type: application/json
Accept: */*
Content-Length: 16

{
  "email": "text"
}

No content