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

@nmnmcc/ability/Authorizer/Forbidden | MembershipRequired | ForbiddenOrigin

Media typeapplication/json
Any of:
object
_tag
required
string
Allowed values: Forbidden
action
required
string
kind
required
string
field
string
reason
string

Example

{
"_tag": "Forbidden"
}

OrganizationNotFound

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

Example

{
"_tag": "OrganizationNotFound"
}

@nmnmcc/ability/Authorizer/Pending

Media typeapplication/json
object
_tag
required
string
Allowed values: Pending
ticket
required
string
reason
string

Example

{
"_tag": "Pending"
}

PlatformUnavailable | OrganizationStorageUnavailable | AuthenticationUnavailable | RequestFailed

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

Example

{
"_tag": "PlatformUnavailable"
}