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

# Generate permissions payload

> Generate the complex permissions payload required by Fansly to apply paywalls, tips, subscriptions, or follow requirements.



## OpenAPI

````yaml openapi.json POST /api/v1/fansly/account/permissions
openapi: 3.1.0
info:
  title: Posttu API
  version: 1.0.0
  description: >-
    Posttu V1 REST API — Workflow automation, social-media post management,
    inbox, tags, and calendar.
servers:
  - url: https://posttu.com
    description: Production
security: []
paths:
  /api/v1/fansly/account/permissions:
    post:
      tags:
        - Fansly
      summary: Generate Fansly permissions payload
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/FanslyPermissionsInput'
      responses:
        '200':
          description: Generated permissions payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FanslyPermissionsResponse'
        '401':
          description: Error response
          content:
            application/json:
              schema:
                type: object
                properties:
                  error:
                    type: string
                required:
                  - error
      security:
        - ApiKeyAuth: []
components:
  schemas:
    FanslyPermissionsInput:
      type: object
      properties:
        isFree:
          type: boolean
          default: false
          description: If true, the content is free.
        price:
          type: number
          description: Optional access price in USD.
        requireSubscription:
          type: boolean
          default: false
          description: If true, subscription is required.
        subscriptionTierId:
          type: string
          description: Optional subscription tier ID.
        requireTipped:
          type: boolean
          default: false
          description: If true, tip is required.
        tipAmount:
          type: number
          description: Required minimum tip amount in USD.
        requireFollowing:
          type: boolean
          default: false
          description: If true, requires user to follow.
        requireFollowedByMe:
          type: boolean
          default: false
          description: If true, requires creator to follow the user back.
        requireMediaPurchases:
          type: boolean
          default: false
          description: If true, requires media purchases.
        mediaPurchasesAmount:
          type: number
          description: Required minimum media purchases amount in USD.
        validBefore:
          anyOf:
            - type: string
            - type: number
          description: Optional ISO date or timestamp before which the permission is valid.
    FanslyPermissionsResponse:
      type: object
      properties:
        success:
          type: boolean
          description: Success status
        error:
          type: string
          description: Error message
        data:
          type:
            - array
            - 'null'
          items:
            type: object
            properties:
              metadata:
                type:
                  - string
                  - 'null'
                description: Stringified JSON array metadata payload
              price:
                type: number
                description: Price in milli-USD (e.g. 5000 is $5.00)
              flags:
                type: number
                description: Sum of Fansly flag values
              before:
                type: number
                description: Optional expiration timestamp
              after:
                type: number
                description: Optional starting timestamp
            required:
              - metadata
              - price
              - flags
      required:
        - success
        - data
  securitySchemes:
    ApiKeyAuth:
      type: http
      scheme: bearer
      description: 'Pass your API key via the Authorization header: `Bearer <api-key>`'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.