# Create a pricing table

`POST /api/v1/pricing-tables`

Needs the `catalog:write` scope. Each entry names a monthly plan, an annual plan, or both.

Needs the `catalog:write` scope, or a full-access key.

## Request body

JSON Schema:

```json
{
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 200
    },
    "entries": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "monthly_plan_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "annual_plan_id": {
            "type": [
              "string",
              "null"
            ],
            "format": "uuid",
            "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
          },
          "highlight": {
            "type": "boolean"
          },
          "features": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 200
            },
            "maxItems": 20
          },
          "cta_label": {
            "type": [
              "string",
              "null"
            ],
            "minLength": 1,
            "maxLength": 60
          }
        }
      },
      "minItems": 1,
      "maxItems": 8
    },
    "default_interval": {
      "type": "string",
      "enum": [
        "monthly",
        "annual"
      ],
      "description": "Default `monthly`."
    },
    "checkout_url": {
      "type": [
        "string",
        "null"
      ],
      "maxLength": 2048,
      "description": "Where a plan’s button links. `{plan_id}`, `{plan_code}` and `{interval}` are filled in by the embed. https (http for localhost only).",
      "example": "https://app.example.com/upgrade?plan={plan_id}&interval={interval}"
    },
    "active": {
      "type": "boolean",
      "description": "Default true."
    }
  },
  "required": [
    "name",
    "entries"
  ]
}
```

## Responses

### 201

The pricing table.

JSON Schema:

```json
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "format": "uuid",
          "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
        },
        "object": {
          "type": "string",
          "enum": [
            "pricing_table"
          ]
        },
        "name": {
          "type": "string"
        },
        "entries": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "monthly_plan_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "annual_plan_id": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "uuid",
                "example": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
              },
              "highlight": {
                "type": "boolean"
              },
              "features": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              },
              "cta_label": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "monthly_plan_id",
              "annual_plan_id",
              "highlight",
              "features",
              "cta_label"
            ]
          }
        },
        "default_interval": {
          "type": "string",
          "enum": [
            "monthly",
            "annual"
          ]
        },
        "checkout_url": {
          "type": [
            "string",
            "null"
          ]
        },
        "active": {
          "type": "boolean"
        },
        "created_at": {
          "type": "string",
          "format": "date-time"
        },
        "updated_at": {
          "type": "string",
          "format": "date-time"
        }
      },
      "required": [
        "id",
        "object",
        "name",
        "entries",
        "default_interval",
        "checkout_url",
        "active",
        "created_at",
        "updated_at"
      ]
    },
    "_agent": {
      "type": "object",
      "properties": {
        "summary": {
          "type": "string"
        },
        "status": {
          "type": "string",
          "enum": [
            "ok"
          ]
        },
        "next_actions": {
          "type": "array",
          "items": {
            "type": "string"
          }
        },
        "warnings": {
          "type": "array",
          "items": {
            "type": "string"
          }
        }
      },
      "required": [
        "summary",
        "status",
        "next_actions",
        "warnings"
      ]
    },
    "api_version": {
      "type": "string",
      "example": "2026-07-01"
    }
  },
  "required": [
    "data",
    "_agent",
    "api_version"
  ]
}
```

### 404

`not_found`: an entry names a plan that does not exist, or no entry names a plan.

### 422

`validation_failed`.
