Skip to content

platform.updatePlatformOrganizationCredits

PATCH
/v1/platform/organizations/{organizationId}/credits
curl --request PATCH \
--url https://example.com/v1/platform/organizations/example/credits \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "enabled": true }'

Turns the credits of an organization on or off. While they are on, the organization can use the models of the platform only when its balance is more than 0.

organizationId
required
string
Media typeapplication/json
object
enabled
required
boolean

Example generated

{
"enabled": true
}

Success

Media typeapplication/json
object
enabled
required
boolean
balanceMicros
required
integer
>= -9007199254740991 <= 9007199254740991
grants
required
Array<object>
object
id
required
string
amountMicros
required
integer
>= -9007199254740991 <= 9007199254740991
note
required
string
createdBy
required
string
createdAt
required
string

Example generated

{
"enabled": true,
"balanceMicros": 1,
"grants": [
{
"id": "example",
"amountMicros": 1,
"note": "example",
"createdBy": "example",
"createdAt": "example"
}
]
}

AuthenticationRequired

Media typeapplication/json
object
_tag
required
string
Allowed values: AuthenticationRequired

Example

{
"_tag": "AuthenticationRequired"
}

PermissionDenied | MembershipRequired | ForbiddenOrigin

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: PermissionDenied
permission
required
string
Allowed values: responses.run sessions.read sessions.write requests.resolve agents.read agents.write agents.delegate triggers.read triggers.write channels.read channels.write channels.use channel_identities.read channel_identities.write connections.read connections.write apps.use apps.publish models.use tokens.read tokens.write organization.read organization.write roles.write model_providers.read model_providers.write sso.read sso.write platform.read platform.write members.read members.write audit_logs.read usage.read budgets.read budgets.write
resource
required
string

Example

{
"_tag": "PermissionDenied",
"permission": "responses.run"
}

OrganizationNotFound

Media typeapplication/json
object
_tag
required
string
Allowed values: OrganizationNotFound
organizationId
required
string

Example

{
"_tag": "OrganizationNotFound"
}

PlatformUnavailable | OrganizationStorageUnavailable | AuthorizationUnavailable | AuthenticationUnavailable

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: PlatformUnavailable

Example

{
"_tag": "PlatformUnavailable"
}