For clean Markdown of any page, append .md to the page URL. For a complete documentation index, see https://docs.prolifi.io/endpoints/plans/llms.txt. For full documentation content, see https://docs.prolifi.io/endpoints/plans/llms-full.txt.

# List plans

GET https://api.prolifi.co/api/v1/public/plans

Returns a paginated list of plans (products) available in your catalog. Defaults to active plans only.

Reference: https://docs.prolifi.io/endpoints/plans/list-plans

## OpenAPI Specification

```yaml
openapi: 3.1.0
info:
  title: Prolifi Public API
  version: 1.0.0
paths:
  /plans:
    get:
      operationId: list-plans
      summary: List plans
      description: >-
        Returns a paginated list of plans (products) available in your catalog.
        Defaults to active plans only.
      tags:
        - subpackage_plans
      parameters:
        - name: limit
          in: query
          description: Maximum number of items to return (1-100).
          required: false
          schema:
            type: integer
            default: 20
        - name: offset
          in: query
          description: Number of items to skip before returning results.
          required: false
          schema:
            type: integer
            default: 0
        - name: status
          in: query
          description: Filter by plan status.
          required: false
          schema:
            $ref: '#/components/schemas/PlansGetParametersStatus'
        - name: Authorization
          in: header
          description: >
            Use a secret key (`sk_test_*` or `sk_live_*`) for full read/write
            access, or a public key (`pk_test_*` or `pk_live_*`) for read-only
            access.
          required: true
          schema:
            type: string
      responses:
        '200':
          description: A paginated list of plans
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Plans_listPlans_Response_200'
        '401':
          description: Authentication failed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
servers:
  - url: https://api.prolifi.co/api/v1/public
  - url: https://sandbox.prolifi.co/api/v1/public
components:
  schemas:
    PlansGetParametersStatus:
      type: string
      enum:
        - active
        - inactive
        - archived
      default: active
      title: PlansGetParametersStatus
    PaginatedResponsePagination:
      type: object
      properties:
        total:
          type: integer
          description: Total number of items matching the query.
        limit:
          type: integer
          description: Maximum items per page.
        offset:
          type: integer
          description: Number of items skipped.
        has_more:
          type: boolean
          description: Whether more items exist beyond the current page.
      title: PaginatedResponsePagination
    PlanStatus:
      type: string
      enum:
        - active
        - inactive
        - archived
      description: Current status.
      title: PlanStatus
    PlanBillingCyclesItems:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
          description: Cycle name (e.g., monthly, yearly).
        interval:
          type: string
          description: Billing interval unit (e.g., month, year).
        interval_count:
          type: integer
          description: Number of intervals per cycle.
        price:
          type: number
          format: double
          description: Price amount in minor units (e.g., kobo, cents).
        currency:
          type: string
          description: ISO 4217 currency code.
      title: PlanBillingCyclesItems
    PlanFeaturesItems:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        type:
          type: string
          description: Feature type (e.g., metered, boolean, limit).
        value:
          type:
            - string
            - 'null'
        unit:
          type:
            - string
            - 'null'
      title: PlanFeaturesItems
    PlanMetadata:
      type: object
      properties: {}
      description: Arbitrary key-value metadata.
      title: PlanMetadata
    Plan:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: Unique identifier.
        name:
          type: string
          description: Display name.
        description:
          type:
            - string
            - 'null'
          description: Plan description.
        status:
          $ref: '#/components/schemas/PlanStatus'
          description: Current status.
        type:
          type: string
          description: Plan type (e.g., subscription, one-time).
        billing_cycles:
          type: array
          items:
            $ref: '#/components/schemas/PlanBillingCyclesItems'
          description: Available billing cycles with pricing.
        features:
          type: array
          items:
            $ref: '#/components/schemas/PlanFeaturesItems'
          description: Features included in the plan.
        metadata:
          oneOf:
            - $ref: '#/components/schemas/PlanMetadata'
            - type: 'null'
          description: Arbitrary key-value metadata.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      title: Plan
    Plans_listPlans_Response_200:
      type: object
      properties:
        pagination:
          $ref: '#/components/schemas/PaginatedResponsePagination'
        data:
          type: array
          items:
            $ref: '#/components/schemas/Plan'
      title: Plans_listPlans_Response_200
    ErrorResponseErrorType:
      type: string
      enum:
        - authentication_error
        - permission_error
        - validation_error
        - not_found
        - invalid_request
        - rate_limit_error
        - ip_restricted
        - conflict
        - api_error
      description: Machine-readable error type.
      title: ErrorResponseErrorType
    ErrorResponseErrorErrorsItems:
      type: object
      properties:
        field:
          type: string
          description: The field that failed validation.
        message:
          type: string
          description: The validation error message.
      title: ErrorResponseErrorErrorsItems
    ErrorResponseError:
      type: object
      properties:
        type:
          $ref: '#/components/schemas/ErrorResponseErrorType'
          description: Machine-readable error type.
        message:
          type: string
          description: Human-readable error description.
        errors:
          type: array
          items:
            $ref: '#/components/schemas/ErrorResponseErrorErrorsItems'
          description: >-
            Field-level validation errors (only present for `validation_error`
            type).
      required:
        - type
        - message
      title: ErrorResponseError
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorResponseError'
      title: ErrorResponse
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >
        Use a secret key (`sk_test_*` or `sk_live_*`) for full read/write
        access, or a public key (`pk_test_*` or `pk_live_*`) for read-only
        access.

```

## SDK Code Examples

```python Plans retrieved
import requests

url = "https://api.prolifi.co/api/v1/public/plans"

headers = {"Authorization": "Bearer <token>"}

response = requests.get(url, headers=headers)

print(response.json())
```

```javascript Plans retrieved
const url = 'https://api.prolifi.co/api/v1/public/plans';
const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go Plans retrieved
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.prolifi.co/api/v1/public/plans"

	req, _ := http.NewRequest("GET", url, nil)

	req.Header.Add("Authorization", "Bearer <token>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby Plans retrieved
require 'uri'
require 'net/http'

url = URI("https://api.prolifi.co/api/v1/public/plans")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'

response = http.request(request)
puts response.read_body
```

```java Plans retrieved
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.prolifi.co/api/v1/public/plans")
  .header("Authorization", "Bearer <token>")
  .asString();
```

```php Plans retrieved
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.prolifi.co/api/v1/public/plans', [
  'headers' => [
    'Authorization' => 'Bearer <token>',
  ],
]);

echo $response->getBody();
```

```csharp Plans retrieved
using RestSharp;

var client = new RestClient("https://api.prolifi.co/api/v1/public/plans");
var request = new RestRequest(Method.GET);
request.AddHeader("Authorization", "Bearer <token>");
IRestResponse response = client.Execute(request);
```

```swift Plans retrieved
import Foundation

let headers = ["Authorization": "Bearer <token>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.prolifi.co/api/v1/public/plans")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```