API

AdminOrg

Operations

Every route this entity exposes. Each route links to its own reference on this page.

Method Route SDK operation Returns
POST /api/v1/admin/organizations/{org_slug}/checkout_session create Success
POST /api/v1/admin/organizations create Success
GET /api/v1/admin/organizations/{org_slug} load Customer account settings
GET /api/v1/admin/organizations load Success
PUT /api/v1/admin/organizations/{org_slug}/billing_agreement update Success
PATCH /api/v1/admin/organizations/{org_slug}/billing_contact update Success
PUT /api/v1/admin/organizations/{org_slug}/package update Success

Examples

One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.

Golang

Construct client as shown in the Golang setup, then call the operations:

admin_org, err := client.AdminOrg(nil).Load(map[string]any{"id": "example_id"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(admin_org)
created, err := client.AdminOrg(nil).Create(map[string]any{"name": "example", "owner_email": "example", "slug": "example"}, nil)
if err != nil {
    panic(err)
}
fmt.Println(created)

Lua

Construct client as shown in the Lua setup, then call the operations:

local admin_org, err = client:AdminOrg():load({ id = "example_id" })
local created, err = client:AdminOrg():create({ name = "example", owner_email = "example", slug = "example" })

PHP

Construct client as shown in the PHP setup, then call the operations:

$admin_org = $client->AdminOrg()->load(["id" => "example_id"]);
$created = $client->AdminOrg()->create(["name" => "example", "owner_email" => "example", "slug" => "example"]);

Python

Construct client as shown in the Python setup, then call the operations:

admin_org = client.AdminOrg().load({"id": "example_id"})
created = client.AdminOrg().create({ "name": "example", "owner_email": "example", "slug": "example" })

Ruby

Construct client as shown in the Ruby setup, then call the operations:

admin_org = client.AdminOrg.load({ "id" => "example_id" })
created = client.AdminOrg.create({ "name" => "example", "owner_email" => "example", "slug" => "example" })

TypeScript

Construct client as shown in the TypeScript setup, then call the operations:

const admin_org = await client.AdminOrg().load({ id: "example_id" })
const created = await client.AdminOrg().create({ name: "example", owner_email: "example", slug: "example" })

Fields

Field Type Required Description
billing_email one,string,null Yes Billing Email
billing_reason string No Required when setting an agreed price
customize_onboarding_packages boolean No Customize Onboarding Packages
deployment_usage_visibility string Yes Deployment Usage Visibility
deployment_usage_visible boolean Yes Deployment Usage Visible
id string Yes Id
monthly_price_dollars one,string,number No Ongoing USD workspace price, for example '50.00'
monthly_price_override_cents one,integer,null Yes Monthly Price Override Cents
name string Yes Name
onboarding_custom_pricing boolean No Onboarding Custom Pricing
onboarding_package_keys one,array,null No Package keys offered when customizing onboarding.
owner_email string Yes Owner Email
package_id one,string,null Yes Active customer package public ID.
skip_payment boolean No Grant the selected package as an ongoing complimentary subscription with monthly included usage and package limits.
slug string Yes Slug

create

POST /api/v1/admin/organizations/{org_slug}/checkout_session

Operation ID: checkout_session_api_v1_admin_organization.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes

Request body

application/json

The request body is object.

Responses

200: Success

application/json

The response is object.

201: Hosted Stripe Checkout URL

application/json

Property Type Required Description
url string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

POST /api/v1/admin/organizations

Operation ID: post_api_v1_admin_organizations.

Authentication: bearer token (bearerAuth).

Request body

application/json

Property Type Required Description
billing_reason string No Required when setting an agreed price
customize_onboarding_packages boolean No
monthly_price_dollars string,number No Ongoing USD workspace price, for example '50.00'
name string Yes
onboarding_custom_pricing boolean No
onboarding_package_keys array of string No Package keys offered when customizing onboarding.
owner_email string (email) Yes
package_id string No Active customer package public ID. Defaults to prepaid Entry unless an agreed monthly price is supplied.
skip_payment boolean No Grant the selected package as an ongoing complimentary subscription with monthly included usage and package limits. No card or checkout is required. Cannot be combined with an agreed monthly price.
slug string Yes

Responses

200: Success

application/json

The response is object.

201: Organization, owner invitation URL, and queued email delivery status

application/json

The response is object and object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

load

GET /api/v1/admin/organizations/{org_slug}

Operation ID: api_v1_admin_organization.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes

Responses

200: Customer account settings

application/json

Property Type Required Description
billing_email string,null Yes
deployment_usage_visibility enum: automatic, hidden, shown Yes
deployment_usage_visible boolean Yes
id string Yes
monthly_price_override_cents integer,null Yes
name string Yes
onboarding_custom_pricing boolean No
onboarding_package_keys array,null No
package_id string,null Yes
slug string Yes
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

GET /api/v1/admin/organizations

Operation ID: api_v1_admin_organizations.

Authentication: bearer token (bearerAuth).

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

update

PUT /api/v1/admin/organizations/{org_slug}/billing_agreement

Operation ID: billing_agreement_api_v1_admin_organization.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes

Request body

application/json

Property Type Required Description
monthly_price_dollars string,number Yes
reason string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

PATCH /api/v1/admin/organizations/{org_slug}/billing_contact

Operation ID: billing_contact_api_v1_admin_organization.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes

Request body

application/json

Property Type Required Description
billing_email string (email) Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway

PUT /api/v1/admin/organizations/{org_slug}/package

Operation ID: package_api_v1_admin_organization.

Authentication: bearer token (bearerAuth).

Parameters

Parameter In Type Required Description
org_slug path string Yes

Request body

application/json

Property Type Required Description
package_id string Yes

Responses

200: Success

application/json

The response is object.

401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway