> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zype.com/llms.txt
> Use this file to discover all available pages before exploring further.

# List Plans

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Monetization",
    "version": "1.0.0",
    "description": ""
  },
  "servers": [
    {
      "url": "https://api.zype.com/"
    }
  ],
  "security": [
    {
      "api_key": []
    }
  ],
  "components": {
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "api_key",
        "in": "query"
      }
    }
  },
  "paths": {
    "/plans": {
      "get": {
        "summary": "List Plans",
        "description": "",
        "tags": [
          "Plans"
        ],
        "operationId": "listPlans",
        "parameters": [
          {
            "name": "id",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by ID\nExample: `id=5992f328ce593000ef000008`"
          },
          {
            "name": "created_at",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "Filter records by created date using times in ISO8601 format (Example: `2017-01-01T00:00:00-00:00`) or Unix timestamps (Example: `1483228800`) **Note**: Range filters can be applied by adding a suffix: ‘.gt’, ‘.gte’, ‘.lt’, ‘lte’ (Example: `created_at.gte`)"
          },
          {
            "name": "q",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Filter by keyword"
          },
          {
            "name": "order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ]
            },
            "description": "Filter by ascending or descending order"
          },
          {
            "name": "sort",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string"
            },
            "description": "Sort on the specified field"
          },
          {
            "name": "page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Page number to return, with per_page dictating page size"
          },
          {
            "name": "per_page",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer"
            },
            "description": "Number of records to return per page"
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "title": "PlansResponse",
                  "type": "object",
                  "properties": {
                    "response": {
                      "type": "array",
                      "items": {
                        "$ref": "#/paths/~1plans/post/responses/201/content/application~1json/schema/properties/response"
                      },
                      "description": ""
                    },
                    "pagination": {
                      "title": "Pagination",
                      "type": "object",
                      "properties": {
                        "current": {
                          "type": "number",
                          "format": "int32",
                          "description": "The current page of results"
                        },
                        "previous": {
                          "type": "number",
                          "format": "int32",
                          "description": "the previous page of results",
                          "nullable": true
                        },
                        "next": {
                          "type": "number",
                          "format": "int32",
                          "description": "the next page of results",
                          "nullable": true
                        },
                        "per_page": {
                          "type": "number",
                          "format": "int32",
                          "description": "the number of results returned per page"
                        },
                        "pages": {
                          "type": "number",
                          "format": "int32",
                          "description": "the total number of pages available, using per_page"
                        }
                      },
                      "example": {
                        "current": 1,
                        "previous": null,
                        "next": 2,
                        "per_page": 10,
                        "pages": 20
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "post": {
        "summary": "Create Plan",
        "description": "",
        "operationId": "createPlan",
        "tags": [
          "Plans"
        ],
        "requestBody": {
          "description": "",
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "title": "PlanRequest",
                "type": "object",
                "required": [
                  "plan"
                ],
                "properties": {
                  "plan": {
                    "required": [
                      "name",
                      "amount",
                      "interval_count",
                      "currency",
                      "interval",
                      "entitlement_type"
                    ],
                    "type": "object",
                    "title": "PlanProperties",
                    "properties": {
                      "name": {
                        "type": "string"
                      },
                      "description": {
                        "type": "string"
                      },
                      "amount": {
                        "type": "integer",
                        "format": "double",
                        "description": "The amount to charge to subscribe to this Plan"
                      },
                      "currency": {
                        "type": "string"
                      },
                      "interval": {
                        "type": "string",
                        "description": "The unit of time a subscriptions should last before the next charge cycle (`month`, `year`, `lifetime`)"
                      },
                      "interval_count": {
                        "type": "integer",
                        "description": "How many intervals a subscription should last before the next charge cycle"
                      },
                      "trial_period_days": {
                        "type": "integer",
                        "description": "How many trial days to provide for the subscription (only for Stripe, Braintree or Recurly Plans)"
                      },
                      "active": {
                        "type": "boolean",
                        "description": "Indicates if the plan is active"
                      },
                      "stripe_id": {
                        "type": "string",
                        "description": "The Stripe Plan ID to use for this Plan - **Required for Stripe Plans**"
                      },
                      "braintree_id": {
                        "type": "string",
                        "description": "The Braintree Plan ID to use for this Plan - **Required for Braintree Plans**"
                      },
                      "recurly_code": {
                        "type": "string",
                        "description": "The Braintree Plan Code to use for this Plan - **Required for Recurly Plans**"
                      },
                      "amazon_id": {
                        "type": "string",
                        "description": "The Amazon Plan ID to use for this Plan - **Required for Amazon Plans**"
                      },
                      "third_party_id": {
                        "type": "string",
                        "description": "An ID from a third-party payment gateway to use for this Plan"
                      },
                      "entitlement_type": {
                        "type": "string",
                        "description": "The entitlement type for this Plan, used to change configure a plan as global or tiered (`global`, `tiered`) - Default: `global`"
                      },
                      "playlist_ids": {
                        "type": "string",
                        "description": "A list of Playlist IDs to associate with a Tiered Plan - **Required for `entitlement_type: tiered`**"
                      }
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Created",
            "content": {
              "application/json": {
                "schema": {
                  "title": "PlanResponse",
                  "type": "object",
                  "properties": {
                    "response": {
                      "title": "Plan",
                      "type": "object",
                      "properties": {
                        "_id": {
                          "type": "string"
                        },
                        "active": {
                          "type": "string"
                        },
                        "amount": {
                          "type": "string"
                        },
                        "created_at": {
                          "type": "string"
                        },
                        "currency": {
                          "type": "string"
                        },
                        "description": {
                          "type": "string"
                        },
                        "interval": {
                          "type": "string"
                        },
                        "interval_count": {
                          "type": "integer"
                        },
                        "name": {
                          "type": "string"
                        },
                        "stripe_id": {
                          "type": "string"
                        },
                        "braintree_id": {
                          "type": "string"
                        },
                        "recurly_code": {
                          "type": "string"
                        },
                        "amazon_id": {
                          "type": "string"
                        },
                        "third_party_id": {
                          "type": "string"
                        },
                        "stripe_public_key": {
                          "type": "string"
                        },
                        "trial_period_days": {
                          "type": "string"
                        },
                        "updated_at": {
                          "type": "string"
                        },
                        "playlist_ids": {
                          "type": "array"
                        },
                        "entitlement_type": {
                          "type": "string"
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Unprocessable entity",
            "content": {
              "application/json": {
                "schema": {
                  "title": "Unprocessable Entity",
                  "type": "object",
                  "properties": {
                    "message": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
}
```