members.dev
Products

Create Product

Creates a product. Required body fields: **name**, **price**. If omitted, **start** defaults to auto, **recurring** to never, **expiry** to never, and **trial** to none. **benefit_schedules** entries may omit **recurring** / **expiry** to inherit from the product; grant **expiry** omissions follow the effective schedule recurrence (see benefit schedule create docs).

POST
/v1/products

Authorization

HTTPBearer
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://api.members.dev/v1/products" \  -H "Content-Type: application/json" \  -d '{    "description": "Access to advanced features",    "name": "Pro Plan",    "price": {      "price_type": "free"    }  }'
{
  "name": "Pro Plan",
  "description": "Access to advanced features",
  "start": {
    "start_type": "auto"
  },
  "recurring": {
    "recurring_type": "never"
  },
  "expiry": {
    "expiry_type": "never"
  },
  "trial": {
    "interval": "day",
    "interval_count": 7
  },
  "price": {
    "amount": 999,
    "currency": "USD",
    "price_type": "fixed"
  },
  "id": "prd_01KKSMB47VYGW97GFE67VGDK7M",
  "status": "Active",
  "state_transitions": {
    "archived_at": {}
  },
  "created_at": null,
  "updated_at": null,
  "benefit_schedules": [
    {
      "recurring": {
        "recurring_type": "never"
      },
      "expiry": {
        "expiry_type": "never"
      },
      "benefit_grants": [
        {
          "benefit_id": "string",
          "value_initial": 0,
          "expiry": {
            "expiry_type": "never"
          }
        }
      ]
    }
  ]
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}