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

# Create trial link

> Create a new free trial link using developer-friendly fields for name, duration, offer limit, and expiration.

**Permission Required:** `promotions:write`



## OpenAPI

````yaml https://api.ofauth.com/openapi.json post /v2/access/promotions/trial-links
openapi: 3.1.0
info:
  title: OFAuth API
  version: 1.0.0
  description: >-
    OFAuth API including Account, Connections, Link, Access, Dynamic Rules,
    Vault+, and Realtime webhook contracts
  contact:
    email: support@ofauth.com
    url: https://ofauth.com/
servers:
  - url: https://api.ofauth.com
security:
  - ApiKey: []
tags:
  - name: Account
    description: Account management endpoints.
  - name: Connections
    description: Connection management endpoints.
  - name: Link
    description: Link authentication and session endpoints.
  - name: Access
    description: All Access related endpoints.
  - name: Analytics
    description: 'Access: charts, tops, and performance metrics.'
  - name: Earnings
    description: 'Access: earnings charts, transactions, and chargebacks.'
  - name: Messages
    description: 'Access: messaging, chats, queue, and mass messaging.'
  - name: Posts
    description: 'Access: create, edit, list, and manage posts.'
  - name: Promotions
    description: 'Access: promotions, trials, and bundles.'
  - name: Users
    description: 'Access: user profiles, subscriptions, and actions.'
  - name: Vault
    description: 'Access: vault folders, media, and management.'
  - name: Upload
    description: 'Access: media upload and processing.'
  - name: Self
    description: 'Access: authenticated account details and settings.'
  - name: Stories
    description: 'Access: stories listing and management.'
  - name: Subscriptions
    description: 'Access: subscription offers, discounts, and management.'
  - name: Realtime
    description: >-
      Realtime webhook delivery contracts, including relayed OnlyFans websocket
      events.
  - name: Dynamic Rules
    description: Dynamic signing rules operations.
  - name: Vault+
    description: Vault+ caching and management.
externalDocs:
  description: OFAuth Developer Documentation
  url: https://docs.ofauth.com
paths:
  /v2/access/promotions/trial-links:
    post:
      tags:
        - Promotions
      summary: Create trial link
      description: >-
        Create a new free trial link using developer-friendly fields for name,
        duration, offer limit, and expiration.


        **Permission Required:** `promotions:write`
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  minLength: 1
                  maxLength: 64
                  description: Trial link name shown in OnlyFans.
                durationDays:
                  type: integer
                  description: >-
                    Free trial duration in days. Options are 1, 3, 7, 14, 30,
                    90, 180, or 360 days; compact strings like 1w, 2w, 1m, 3m,
                    6m, and 12m are accepted.
                  enum:
                    - 1
                    - 3
                    - 7
                    - 14
                    - 30
                    - 90
                    - 180
                    - 360
                offer:
                  type: object
                  properties:
                    limit:
                      type: integer
                      default: 0
                      description: >-
                        Offer limit: number of subscribers who can claim the
                        trial link. Use 0 for no limit.
                      enum:
                        - 0
                        - 1
                        - 2
                        - 3
                        - 4
                        - 5
                        - 6
                        - 7
                        - 8
                        - 9
                        - 10
                        - 50
                        - 100
                    expirationDays:
                      type: integer
                      minimum: 0
                      maximum: 30
                      default: 0
                      description: >-
                        Offer expiration in days (0-30). Use 0 for no
                        expiration.
                  default:
                    limit: 0
                    expirationDays: 0
                  description: Offer limit and expiration for the trial link.
              required:
                - name
                - durationDays
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    type: number
                  trialLinkName:
                    type: string
                  url:
                    type: string
                  subscribeDays:
                    type: number
                  subscribeCounts:
                    type: number
                  claimCounts:
                    type: number
                  clicksCounts:
                    type: number
                  expiredAt:
                    type: string
                    nullable: true
                  createdAt:
                    type: string
                  isFinished:
                    type: boolean
                  user:
                    nullable: true
                  sharedWith:
                    type: string
                    nullable: true
                required:
                  - id
                  - trialLinkName
                  - url
                  - subscribeDays
                  - subscribeCounts
                  - claimCounts
                  - clicksCounts
                  - expiredAt
                  - createdAt
                  - isFinished
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
        '429':
          description: Rate Limit Exceeded
        '500':
          description: Internal Server Error
        '502':
          description: Bad Gateway
      security:
        - ApiKey: []
          ConnectionId: []
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      name: apiKey
      in: header
      description: >-
        Your OFAuth [API key](/quickstart#2-copy-your-api-key) for
        authenticating requests.
    ConnectionId:
      type: apiKey
      name: x-connection-id
      in: header
      description: >-
        Requires a [connection](/guides/connections) via the x-connection-id
        header.

````