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

# Update

> Edit an attached OnlyFans account.



## OpenAPI

````yaml POST /accounts/{username}
openapi: 3.0.3
info:
  title: OnlyTraffic Studio API
  version: 1.0.0
  description: >-
    External API for OnlyTraffic Studio. Manage and retrieve data about your
    subscribers, CPL orders, and CPC orders.
servers:
  - url: https://studio-api.onlytraffic.com/api/external/v1
security:
  - ApiKeyAuth: []
tags:
  - name: Account
    description: API key holder's wallet, profile, and aggregate state.
  - name: Accounts
    description: OnlyFans accounts attached to the API key holder.
  - name: Agencies
    description: Agency CRUD and image management. All edits stage in moderation.
  - name: CPL
    description: >-
      Cost-per-lead orders: place, list, cancel, manage settings, browse partner
      offers.
  - name: CPC
    description: Cost-per-click orders and creative management.
  - name: RevShare
    description: Revenue-share campaigns and invoices.
  - name: Swaps
    description: Two-sided traffic swap orders and offers.
  - name: Subscribers
    description: Per-fan delivery feed (cursor-paginated).
  - name: Transactions
    description: Per-transaction OF revenue feed (cursor-paginated).
paths:
  /accounts/{username}:
    post:
      tags:
        - Accounts
      summary: Update
      description: Edit an attached OnlyFans account.
      operationId: updateAccount
      parameters:
        - $ref: '#/components/parameters/UsernamePath'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AccountUpdate'
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  data:
                    type: object
                    properties:
                      of_account_id:
                        type: integer
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Account not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation error or account disabled
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  parameters:
    UsernamePath:
      name: username
      in: path
      required: true
      schema:
        type: string
        pattern: ^[a-zA-Z0-9_.-]+$
        maxLength: 30
      description: OnlyFans username of the model owned by your account.
      example: mymodel
  schemas:
    AccountUpdate:
      type: object
      description: Editable fields for an attached OnlyFans account.
      example:
        client_status: active
        note: Top performer this quarter
        tags:
          - blonde
          - fitness
          - tattoos
        of_list_enabled: true
        of_list_template: '{source} {date}'
      properties:
        client_status:
          type: string
          enum:
            - active
            - archived
        note:
          type: string
          maxLength: 1000
          nullable: true
        tags:
          type: array
          maxItems: 20
          items:
            type: string
          example:
            - blonde
            - fitness
            - tattoos
          description: >-
            Up to 20 model tag slugs. Allowed values are dynamic. Invalid slugs
            return 422.
        of_list_enabled:
          type: boolean
          description: >-
            When `true`, fans coming through your campaigns are auto-added to
            named OnlyFans lists generated from `of_list_template`.
        of_list_template:
          type: string
          maxLength: 60
          nullable: true
          example: '{source} {date}'
          description: >-
            Template for the OnlyFans list name. Macros are substituted per
            campaign at the moment a fan is added: `{source}`, `{date}`,
            `{pricing_model}`, `{marketer_name}`, `{public_id}`. The rendered
            name is capped at 60 characters.
    ErrorResponse:
      type: object
      description: Standard error envelope for all 4xx/5xx responses.
      required:
        - success
        - error
        - message
      properties:
        success:
          type: boolean
          enum:
            - false
          description: Always false on error responses.
        error:
          type: string
          description: Stable snake_case machine-readable error code. Branch on this.
          example: validation_failed
        message:
          type: string
          description: >-
            Human-friendly text. For 5xx this is always the literal `Server
            error`. For 4xx an actionable validation/auth message is returned.
        details:
          type: object
          nullable: true
          description: >-
            Optional per-field diagnostic information. On 422 carries `{<field>:
            ["error_code", ...]}`. On 402 (`insufficient_balance`) carries
            `{required, current}`. On 426 (`unpaid_invoices`) carries `{count,
            total, oldest_date_ts}`. Absent on most other errors.
          additionalProperties: true
        retry_after:
          type: integer
          nullable: true
          description: >-
            Seconds until the next request will succeed. Present only on 429
            responses (rate limit). Mirrors the `Retry-After` HTTP header.
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your API key from the Studio Dashboard

````