For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDashboard
Getting StartedAPI ReferenceRoadmapBlog
Getting StartedAPI ReferenceRoadmapBlog
    • Resources
    • Authentication
    • Pagination
    • Rate limiting
  • API Keys
    • GETList api keys
    • GETGet api key
    • POSTCreate api key
    • PUTUpdate api key
    • DELDelete api key
  • Environments
    • POSTCreate environment
    • PUTUpdate environment
    • DELDelete environment
  • Plans
    • The Plan object
    • GETList plans
    • GETGet plan
    • POSTCreate plan
    • PUTUpdate plan
    • DELDelete plan
  • Companies
    • The Company object
    • GETList companies
    • POSTUpsert company
    • GETLookup company
    • DELDelete company
    • POSTDelete company by keys
    • GETList company memberships
    • POSTGet or create company membership
    • DELDelete company membership
    • POSTUpsert company trait
  • Users
    • The User object
    • GETList users
    • GETLookup user
    • POSTUpsert user
    • DELDelete user
    • POSTDelete user by keys
    • POSTUpsert user trait
  • Events
    • The Event object
    • GETList events
    • POSTCreate event
    • POSTCreate event batch
    • GETGet event
  • Features
    • The Feature object
    • GETList features
    • GETGet feature
    • POSTCreate feature
    • PUTUpdate feature
    • DELDelete feature
  • Flags
    • The Flag object
    • GETList flags
    • GETGet flag
    • POSTCreate flag
    • PUTUpdate flag
    • DELDelete flag
    • PUTUpdate flag rules
    • POSTCheck flag
    • POSTCheck flags
  • Entitlements
    • GETList company overrides
    • GETGet company override
    • POSTCreate company override
    • PUTUpdate company override
    • DELDelete company override
    • GETList plan entitlements
    • GETGet plan entitlement
    • POSTCreate plan entitlement
    • PUTUpdate plan entitlement
    • DELDelete plan entitlement
  • Feature Usage
    • GETList feature usage
  • Billing Credits
    • GETList credits
    • POSTCreate credit
    • GETGet credit
    • PUTUpdate credit
    • DELDelete credit
    • GETList credit bundles
    • POSTCreate credit bundle
    • GETGet credit bundle
    • PUTUpdate credit bundle
    • DELDelete credit bundle
    • POSTGrant credits to company
    • GETList company credit grants
    • GETList credit grants
    • PUTZero out credit grant
    • GETList plan credit grants
    • POSTCreate plan credit grant
    • DELDelete plan credit grant
    • GETGet credit ledger
  • Account Members
    • GETList account members
    • GETGet account member
LogoLogo
SupportDashboard
Plans

Create plan

POST
https://api.schematichq.com/plans
POST
/plans
1import { SchematicClient } from "@schematichq/schematic-typescript-node";
2
3async function main() {
4 const client = new SchematicClient({
5 apiKey: "YOUR_API_KEY_HERE",
6 });
7 await client.plans.createPlan({
8 description: "string",
9 name: "string",
10 planType: "plan",
11 });
12}
13main();
1{
2 "data": {
3 "billing_strategy": "schematic_managed",
4 "charge_type": "free",
5 "company_count": 1,
6 "controlled_by": "orb",
7 "created_at": "2024-01-15T09:30:00Z",
8 "currency_prices": [
9 {
10 "currency": "string",
11 "monthly_price": {
12 "currency": "string",
13 "external_price_id": "string",
14 "id": "string",
15 "interval": "day",
16 "interval_count": 1,
17 "price": 1,
18 "provider_type": "orb",
19 "scheme": "per_unit",
20 "nickname": "string",
21 "price_decimal": "string"
22 },
23 "one_time_price": {
24 "currency": "string",
25 "external_price_id": "string",
26 "id": "string",
27 "interval": "day",
28 "interval_count": 1,
29 "price": 1,
30 "provider_type": "orb",
31 "scheme": "per_unit",
32 "nickname": "string",
33 "price_decimal": "string"
34 },
35 "quarterly_price": {
36 "currency": "string",
37 "external_price_id": "string",
38 "id": "string",
39 "interval": "day",
40 "interval_count": 1,
41 "price": 1,
42 "provider_type": "orb",
43 "scheme": "per_unit",
44 "nickname": "string",
45 "price_decimal": "string"
46 },
47 "yearly_price": {
48 "currency": "string",
49 "external_price_id": "string",
50 "id": "string",
51 "interval": "day",
52 "interval_count": 1,
53 "price": 1,
54 "provider_type": "orb",
55 "scheme": "per_unit",
56 "nickname": "string",
57 "price_decimal": "string"
58 }
59 }
60 ],
61 "description": "string",
62 "features": [
63 {
64 "created_at": "2024-01-15T09:30:00Z",
65 "description": "string",
66 "feature_type": "boolean",
67 "flags": [
68 {
69 "created_at": "2024-01-15T09:30:00Z",
70 "default_value": true,
71 "description": "string",
72 "flag_type": "boolean",
73 "id": "string",
74 "key": "string",
75 "name": "string",
76 "rules": [
77 {
78 "condition_groups": [
79 {
80 "conditions": [
81 {
82 "condition_type": "base_plan",
83 "created_at": "2024-01-15T09:30:00Z",
84 "environment_id": "string",
85 "id": "string",
86 "operator": "eq",
87 "resource_ids": [
88 "string"
89 ],
90 "resources": [
91 {
92 "id": "string",
93 "name": "string",
94 "description": "string",
95 "image_url": "string"
96 }
97 ],
98 "rule_id": "string",
99 "trait_value": "string",
100 "updated_at": "2024-01-15T09:30:00Z",
101 "comparison_trait": {
102 "created_at": "2024-01-15T09:30:00Z",
103 "display_name": "string",
104 "entity_type": "company",
105 "hierarchy": [
106 "string"
107 ],
108 "id": "string",
109 "trait_type": "boolean",
110 "updated_at": "2024-01-15T09:30:00Z"
111 },
112 "comparison_trait_id": "string",
113 "condition_group_id": "string",
114 "event_subtype": "string",
115 "flag_id": "string",
116 "metric_period": "all_time",
117 "metric_period_month_reset": "billing_cycle",
118 "metric_value": 1,
119 "trait": {
120 "created_at": "2024-01-15T09:30:00Z",
121 "display_name": "string",
122 "entity_type": "company",
123 "hierarchy": [
124 "string"
125 ],
126 "id": "string",
127 "trait_type": "boolean",
128 "updated_at": "2024-01-15T09:30:00Z"
129 },
130 "trait_entity_type": "company",
131 "trait_id": "string"
132 }
133 ],
134 "created_at": "2024-01-15T09:30:00Z",
135 "environment_id": "string",
136 "id": "string",
137 "rule_id": "string",
138 "updated_at": "2024-01-15T09:30:00Z",
139 "flag_id": "string"
140 }
141 ],
142 "conditions": [
143 {
144 "condition_type": "base_plan",
145 "created_at": "2024-01-15T09:30:00Z",
146 "environment_id": "string",
147 "id": "string",
148 "operator": "eq",
149 "resource_ids": [
150 "string"
151 ],
152 "resources": [
153 {
154 "id": "string",
155 "name": "string",
156 "description": "string",
157 "image_url": "string"
158 }
159 ],
160 "rule_id": "string",
161 "trait_value": "string",
162 "updated_at": "2024-01-15T09:30:00Z",
163 "comparison_trait": {
164 "created_at": "2024-01-15T09:30:00Z",
165 "display_name": "string",
166 "entity_type": "company",
167 "hierarchy": [
168 "string"
169 ],
170 "id": "string",
171 "trait_type": "boolean",
172 "updated_at": "2024-01-15T09:30:00Z"
173 },
174 "comparison_trait_id": "string",
175 "condition_group_id": "string",
176 "event_subtype": "string",
177 "flag_id": "string",
178 "metric_period": "all_time",
179 "metric_period_month_reset": "billing_cycle",
180 "metric_value": 1,
181 "trait": {
182 "created_at": "2024-01-15T09:30:00Z",
183 "display_name": "string",
184 "entity_type": "company",
185 "hierarchy": [
186 "string"
187 ],
188 "id": "string",
189 "trait_type": "boolean",
190 "updated_at": "2024-01-15T09:30:00Z"
191 },
192 "trait_entity_type": "company",
193 "trait_id": "string"
194 }
195 ],
196 "created_at": "2024-01-15T09:30:00Z",
197 "environment_id": "string",
198 "id": "string",
199 "name": "string",
200 "priority": 1,
201 "rule_type": "company_override",
202 "updated_at": "2024-01-15T09:30:00Z",
203 "value": true,
204 "flag_id": "string"
205 }
206 ],
207 "updated_at": "2024-01-15T09:30:00Z",
208 "feature": {
209 "created_at": "2024-01-15T09:30:00Z",
210 "description": "string",
211 "feature_type": "boolean",
212 "icon": "string",
213 "id": "string",
214 "name": "string",
215 "updated_at": "2024-01-15T09:30:00Z",
216 "event_subtype": "string",
217 "lifecycle_phase": "add_on",
218 "maintainer_account_member_id": "string",
219 "plural_name": "string",
220 "singular_name": "string",
221 "trait_id": "string"
222 },
223 "feature_id": "string",
224 "last_checked_at": "2024-01-15T09:30:00Z",
225 "maintainer_account_member_id": "string"
226 }
227 ],
228 "icon": "string",
229 "id": "string",
230 "name": "string",
231 "plans": [
232 {
233 "id": "string",
234 "name": "string",
235 "description": "string",
236 "image_url": "string"
237 }
238 ],
239 "updated_at": "2024-01-15T09:30:00Z",
240 "billing_linked_resource": {
241 "billing_provider": "orb",
242 "external_resource_id": "string",
243 "originator": "orb"
244 },
245 "event_subtype": "string",
246 "event_summary": {
247 "company_count": 1,
248 "environment_id": "string",
249 "event_count": 1,
250 "event_subtype": "string",
251 "user_count": 1,
252 "last_seen_at": "2024-01-15T09:30:00Z"
253 },
254 "lifecycle_phase": "add_on",
255 "maintainer_account_member_id": "string",
256 "plural_name": "string",
257 "singular_name": "string",
258 "trait": {
259 "created_at": "2024-01-15T09:30:00Z",
260 "display_name": "string",
261 "entity_type": "company",
262 "hierarchy": [
263 "string"
264 ],
265 "id": "string",
266 "trait_type": "boolean",
267 "updated_at": "2024-01-15T09:30:00Z"
268 },
269 "trait_id": "string"
270 }
271 ],
272 "icon": "amber",
273 "id": "string",
274 "is_trialable": true,
275 "name": "string",
276 "plan_type": "plan",
277 "updated_at": "2024-01-15T09:30:00Z",
278 "versions": [
279 {
280 "created_at": "2024-01-15T09:30:00Z",
281 "description": "string",
282 "environment_id": "string",
283 "icon": "amber",
284 "id": "string",
285 "name": "string",
286 "plan_type": "plan",
287 "status": "published",
288 "updated_at": "2024-01-15T09:30:00Z",
289 "version": 1,
290 "original_plan_id": "string"
291 }
292 ],
293 "is_default": true,
294 "is_free": true,
295 "active_version": {
296 "created_at": "2024-01-15T09:30:00Z",
297 "description": "string",
298 "environment_id": "string",
299 "icon": "amber",
300 "id": "string",
301 "name": "string",
302 "plan_type": "plan",
303 "status": "published",
304 "updated_at": "2024-01-15T09:30:00Z",
305 "version": 1,
306 "original_plan_id": "string"
307 },
308 "billing_linked_resource": {
309 "billing_provider": "orb",
310 "external_resource_id": "string",
311 "originator": "orb"
312 },
313 "billing_product": {
314 "account_id": "string",
315 "created_at": "2024-01-15T09:30:00Z",
316 "environment_id": "string",
317 "external_id": "string",
318 "is_active": true,
319 "name": "string",
320 "price": 1.1,
321 "prices": [
322 {
323 "currency": "string",
324 "external_price_id": "string",
325 "id": "string",
326 "interval": "day",
327 "interval_count": 1,
328 "price": 1,
329 "provider_type": "orb",
330 "scheme": "per_unit",
331 "nickname": "string",
332 "price_decimal": "string"
333 }
334 ],
335 "product_id": "string",
336 "provider_type": "orb",
337 "quantity": 1.1,
338 "subscription_count": 1,
339 "updated_at": "2024-01-15T09:30:00Z",
340 "price_decimal": "string",
341 "currency": "string"
342 },
343 "company_id": "string",
344 "company_name": "string",
345 "copied_from_plan_id": "string",
346 "draft_version": {
347 "created_at": "2024-01-15T09:30:00Z",
348 "description": "string",
349 "environment_id": "string",
350 "icon": "amber",
351 "id": "string",
352 "name": "string",
353 "plan_type": "plan",
354 "status": "published",
355 "updated_at": "2024-01-15T09:30:00Z",
356 "version": 1,
357 "original_plan_id": "string"
358 },
359 "included_credit_grants": [
360 {
361 "auto_topup_enabled": true,
362 "auto_topup_self_service": true,
363 "created_at": "2024-01-15T09:30:00Z",
364 "credit_amount": 1,
365 "credit_id": "string",
366 "id": "string",
367 "plan_id": "string",
368 "updated_at": "2024-01-15T09:30:00Z",
369 "credit_name": "string",
370 "plan_name": "string",
371 "auto_topup_amount": 1,
372 "auto_topup_amount_type": "string",
373 "auto_topup_expiry_type": "duration",
374 "auto_topup_expiry_unit": "billing_periods",
375 "auto_topup_expiry_unit_count": 1,
376 "auto_topup_threshold_credits": 1,
377 "auto_topup_threshold_percent": 1,
378 "credit": {
379 "burn_strategy": "expiration_priority",
380 "cost_editable": true,
381 "created_at": "2024-01-15T09:30:00Z",
382 "currency_prices": [
383 {
384 "currency": "string",
385 "price": {
386 "currency": "string",
387 "external_price_id": "string",
388 "id": "string",
389 "interval": "day",
390 "interval_count": 1,
391 "price": 1,
392 "provider_type": "orb",
393 "scheme": "per_unit",
394 "nickname": "string",
395 "price_decimal": "string"
396 }
397 }
398 ],
399 "default_expiry_unit": "billing_periods",
400 "default_rollover_policy": "expire",
401 "description": "string",
402 "id": "string",
403 "name": "string",
404 "updated_at": "2024-01-15T09:30:00Z",
405 "default_expiry_unit_count": 1,
406 "icon": "string",
407 "plural_name": "string",
408 "price": {
409 "currency": "string",
410 "external_price_id": "string",
411 "id": "string",
412 "interval": "day",
413 "interval_count": 1,
414 "price": 1,
415 "provider_type": "orb",
416 "scheme": "per_unit",
417 "nickname": "string",
418 "price_decimal": "string"
419 },
420 "product": {
421 "account_id": "string",
422 "created_at": "2024-01-15T09:30:00Z",
423 "environment_id": "string",
424 "external_id": "string",
425 "is_active": true,
426 "name": "string",
427 "price": 1.1,
428 "product_id": "string",
429 "provider_type": "orb",
430 "quantity": 1.1,
431 "updated_at": "2024-01-15T09:30:00Z",
432 "price_decimal": "string",
433 "currency": "string"
434 },
435 "singular_name": "string"
436 },
437 "expiry_type": "duration",
438 "expiry_unit": "billing_periods",
439 "expiry_unit_count": 1,
440 "plan": {
441 "id": "string",
442 "name": "string",
443 "description": "string",
444 "image_url": "string"
445 },
446 "plan_version_id": "string",
447 "reset_cadence": "daily",
448 "reset_start": "billing_period",
449 "reset_type": "no_reset",
450 "credit_plural_name": "string",
451 "credit_singular_name": "string"
452 }
453 ],
454 "monthly_price": {
455 "currency": "string",
456 "external_price_id": "string",
457 "id": "string",
458 "interval": "day",
459 "interval_count": 1,
460 "price": 1,
461 "provider_type": "orb",
462 "scheme": "per_unit",
463 "nickname": "string",
464 "price_decimal": "string"
465 },
466 "one_time_price": {
467 "currency": "string",
468 "external_price_id": "string",
469 "id": "string",
470 "interval": "day",
471 "interval_count": 1,
472 "price": 1,
473 "provider_type": "orb",
474 "scheme": "per_unit",
475 "nickname": "string",
476 "price_decimal": "string"
477 },
478 "quarterly_price": {
479 "currency": "string",
480 "external_price_id": "string",
481 "id": "string",
482 "interval": "day",
483 "interval_count": 1,
484 "price": 1,
485 "provider_type": "orb",
486 "scheme": "per_unit",
487 "nickname": "string",
488 "price_decimal": "string"
489 },
490 "trial_days": 1,
491 "yearly_price": {
492 "currency": "string",
493 "external_price_id": "string",
494 "id": "string",
495 "interval": "day",
496 "interval_count": 1,
497 "price": 1,
498 "provider_type": "orb",
499 "scheme": "per_unit",
500 "nickname": "string",
501 "price_decimal": "string"
502 },
503 "audience_type": "string"
504 },
505 "params": {}
506}
Was this page helpful?
Previous

Update plan

Next
Built with

Authentication

X-Schematic-Api-Keystring
API Key authentication via header

Request

This endpoint expects an object.
descriptionstringRequired0-1024 characters
namestringRequired1-256 characters
plan_typeenumRequired
Allowed values:
iconenum or nullOptional

Response

Created
dataobject
paramsobject
Input parameters

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
404
Not Found Error
500
Internal Server Error