Skip to content

Give an organization a plan against an invoice

PUT
/api/platform/organizations/{id}/plan
curl --request PUT \
--url https://forge.example.com/api/platform/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/plan \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "planCode": "example", "quantity": 1, "period": "example", "customLimits": true, "reviewers": 1, "creators": 1, "peoplePooled": true, "models": 1, "aiMonthMicrodollars": 1, "aiDayMicrodollars": 1, "termStartsAt": "2026-04-15T12:00:00Z", "termEndsAt": "2026-04-15T12:00:00Z", "purchaseReference": "example", "invoicedOn": "2026-04-15", "paidBy": "example", "note": "example", "packs": [ { "code": "example", "quantity": 1 } ], "reason": "example", "version": 1 }'

Send planCode, quantity for a plan sold by the seat, the term’s dates (a year from today unless given), purchaseReference, invoicedOn, and paidBy: ach, wire, check, card or other. With customLimits the limits sent replace the plan’s own for this organization (a missing one means no limit); packs replace the packs it had. Payment itself happens outside the application. A trial that gets a plan stops being a trial for good and keeps everything. Send the plan’s version as you read it (0 when it has none). 409 for an organization that pays by card through Stripe.

id
required
string format: uuid
Media typeapplication/json
object
planCode
required
null | string
quantity
required
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
period
required
null | string
customLimits
required
boolean
reviewers
required
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
creators
required
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
peoplePooled
required
boolean
models
required
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
aiMonthMicrodollars
required
null | integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
aiDayMicrodollars
required
null | integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
termStartsAt
required
null | string format: date-time
termEndsAt
required
null | string format: date-time
purchaseReference
required
null | string
invoicedOn
required
null | string format: date
paidBy
required
null | string
note
required
null | string
packs
required
Array<object> | null
object
code
required
null | string
quantity
required
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
reason
required
null | string
version
required
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/

Example generated

{
"planCode": "example",
"quantity": 1,
"period": "example",
"customLimits": true,
"reviewers": 1,
"creators": 1,
"peoplePooled": true,
"models": 1,
"aiMonthMicrodollars": 1,
"aiDayMicrodollars": 1,
"termStartsAt": "2026-04-15T12:00:00Z",
"termEndsAt": "2026-04-15T12:00:00Z",
"purchaseReference": "example",
"invoicedOn": "2026-04-15",
"paidBy": "example",
"note": "example",
"packs": [
{
"code": "example",
"quantity": 1
}
],
"reason": "example",
"version": 1
}

OK

Media typeapplication/json
object
organizationId
required
string format: uuid
organizationPlan
required
string
plan
required
One of:
null
baseLimits
required
One of:
null
limits
required
One of:
null
note
required
null | string
packs
required
Array<object>
object
code
required
string
name
required
string
kind
required
string
size
required
integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
quantity
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
meters
required
Array<object>
object
key
required
string
label
required
string
used
required
integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
limit
required
null | integer | string format: int64
/^-?(?:0|[1-9]\d*)$/
percent
required
null | integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
state
required
string
hard
required
boolean
waiting
integer | string format: int64
0 /^-?(?:0|[1-9]\d*)$/
readers
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
version
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
ai
One of:
null

Example

{
"meters": [
{
"waiting": 0
}
]
}

A refusal or an error, as a problem document. A model or draft you may not see answers 404, as one that does not exist.

Media typeapplication/problem+json
object
type
string
title
string
status
integer
detail
string
instance
string

Example generated

{
"type": "example",
"title": "example",
"status": 1,
"detail": "example",
"instance": "example"
}