Skip to content

platform.grantPlatformOrganizationCredits

POST
/v1/platform/organizations/{organizationId}/credits/grants
curl --request POST \
--url https://example.com/v1/platform/organizations/example/credits/grants \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "amountMicros": 1, "note": "example" }'

Adds credits to an organization. A negative amount takes credits back.

organizationId
required
string
Media typeapplication/json
object
amountMicros
required
integer
>= -9007199254740991 <= 9007199254740991
note
required
string
>= 1 characters <= 500 characters

Example generated

{
"amountMicros": 1,
"note": "example"
}

Success

Media typeapplication/json
object
id
required
string
amountMicros
required
integer
>= -9007199254740991 <= 9007199254740991
note
required
string
createdBy
required
string
createdAt
required
string

Example generated

{
"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"
}