---
title: "Create a pass [Beta]"
method: POST
path: "/passes"
---

# Create a pass [Beta]

`POST /passes`

Use this endpoint to create externally-managed passes. <br><br>The life cycle of externally-managed passes is managed outside of Cleeng so it is up to a publisher to notify Cleeng about pass status changes, e.g. the change of pass expiration date or pass termination if auto-termination is not enabled (if auto-termination is not enabled for the payment method, Cleeng platform will not terminate the pass when expiry date is reached, and the publisher will need to send the termination request to revoke access). <br><br> You can create [multiple passes for the same offer and customer](https://developers.cleeng.com/docs/externally-managed-passes#multiple-passes-per-offer) with this endpoint. But the endpoint prevents duplicate passes with the same external ID and source. It only allows new passes if there isn't already an active pass from the same source and with the same external ID.

## Headers

- `Content-Type` string

## Request body

- object
  - `customerId` integer, required — The identifier of Cleeng customer. Minimum: `100000000`, maximum: `999999999`.
  - `offerId` string, required — The identifier of Cleeng offer.
  - `paymentMethodId` integer, required — The identifier of the payment method configured for externally-managed passes; provided by Cleeng.
  - `externalId` string, required — The external identifier of a pass. The identifier must be unique for a given payment method (i.e. you can't have two identical identifiers for the same payment method).
  - `expiresAt` integer — Expiration time in UNIX timestamp format. For non-expiring (permanent) passes it must be set to `null`. If the parameter is not provided, `expiresAt` will be calculated based on an offer.
  - `externalProperties` object — Any external properties of a pass. Payload is limited to 4000 characters.
    - `property1` string — Example property
  - `paymentId` integer — The identifier of Cleeng payment. (Payment must be created with the same `paymentMethodId` as specified here).

## Response `201`

201

- object
  - `passId` integer
  - `customerId` integer
  - `status` string
  - `offerId` string
  - `expiresAt` integer
  - `paymentMethodId` integer
  - `externalId` string
  - `externalProperties` object
  - `isExternallyManaged` boolean
  - `source` string

## Other responses

- `400` — 400
- `422` — 422

---

[API](https://skmtc.net/cleeng/apis/mediastore-api.md) · [All operations](https://skmtc.net/cleeng/apis/mediastore-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cleeng/mediastore-api/versions/00cbfe7998a4/schema)
