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

# Create or update ticket

> Create a ticket (no ticketId; resolves/auto-creates the admin owner for the email) or update one by full UUID or shortId. Optional message adds a reply — senderRole admin (default) posts as the API caller, creator syncs the customer reply. Closing triggers email + webhook.

Authentication: API key via X-API-Key header (or Authorization: Bearer).
Permissions: User API key
Rate limit: api_admin_write — 20 requests/min per API user.



## OpenAPI

````yaml /api-reference/platform.openapi.json post /api/platform/v1/tickets/manage
openapi: 3.1.0
info:
  title: Platform API
  version: 1.0.0
  description: >-
    Manage platform users, subscriptions, add-ons, and support tickets across
    your platform. These endpoints require platform-level access on the account
    that owns the API key.


    Generate your API key in the Developer Portal (profile menu → Developer) and
    send it in the `X-API-Key` header, or as `Authorization: Bearer <key>`.
    Never put the key in the URL.


    Every endpoint accepts POST with a JSON body, and also accepts GET with the
    same parameters as query-string values. All responses use the envelope `{
    success, data?, message?, error? }`.
servers:
  - url: https://YOUR_DOMAIN
    description: Your deployment, for example https://app.example.com
security: []
tags:
  - name: Platform
  - name: Users
  - name: Subscriptions
  - name: Add-ons
  - name: Tickets
paths:
  /api/platform/v1/tickets/manage:
    post:
      tags:
        - Tickets
      summary: Create or update ticket
      description: >-
        Create a ticket (no ticketId; resolves/auto-creates the admin owner for
        the email) or update one by full UUID or shortId. Optional message adds
        a reply — senderRole admin (default) posts as the API caller, creator
        syncs the customer reply. Closing triggers email + webhook.


        Authentication: API key via X-API-Key header (or Authorization: Bearer).

        Permissions: User API key

        Rate limit: api_admin_write — 20 requests/min per API user.
      parameters:
        - name: platformId
          in: query
          required: false
          description: Your platform id.
          schema:
            type: string
            example: pf_1
        - name: ticketId
          in: query
          required: false
          description: Full UUID or shortId. Omit to create.
          schema:
            type: string
            example: '446655440000'
        - name: email
          in: query
          required: false
          description: Required when creating.
          schema:
            type: string
            example: john@acme.com
        - name: title
          in: query
          required: false
          description: Required when creating.
          schema:
            type: string
        - name: description
          in: query
          required: false
          description: Required when creating.
          schema:
            type: string
        - name: status
          in: query
          required: false
          description: open | in_progress | resolved | closed.
          schema:
            type: string
        - name: priority
          in: query
          required: false
          description: low | medium | high | urgent.
          schema:
            type: string
        - name: message
          in: query
          required: false
          description: Reply/note added to the thread.
          schema:
            type: string
        - name: senderRole
          in: query
          required: false
          description: admin (default) | creator.
          schema:
            type: string
        - name: isInternal
          in: query
          required: false
          description: Admin-only note flag (admin replies only).
          schema:
            type: boolean
            example: false
        - name: assignedToId
          in: query
          required: false
          description: Admin user id to assign.
          schema:
            type: string
        - name: assignedToName
          in: query
          required: false
          description: Display name of assigned admin.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - platformId
              properties:
                platformId:
                  type: string
                  description: Your platform id.
                  example: pf_1
                ticketId:
                  type: string
                  description: Full UUID or shortId. Omit to create.
                  example: '446655440000'
                email:
                  type: string
                  description: Required when creating.
                  example: john@acme.com
                title:
                  type: string
                  description: Required when creating.
                description:
                  type: string
                  description: Required when creating.
                status:
                  type: string
                  description: open | in_progress | resolved | closed.
                priority:
                  type: string
                  description: low | medium | high | urgent.
                message:
                  type: string
                  description: Reply/note added to the thread.
                senderRole:
                  type: string
                  description: admin (default) | creator.
                isInternal:
                  type: boolean
                  description: Admin-only note flag (admin replies only).
                  example: false
                assignedToId:
                  type: string
                  description: Admin user id to assign.
                assignedToName:
                  type: string
                  description: Display name of assigned admin.
            example:
              platformId: pf_1
              email: john@acme.com
              title: Payment not going through
              description: Checkout fails.
              priority: high
      responses:
        '200':
          description: 'Success. Envelope: { success:true, data, message? }.'
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                properties:
                  success:
                    type: boolean
                    example: true
                  data: {}
                  message:
                    type: string
                  pagination:
                    type: object
                  total:
                    type: number
              example:
                success: true
                message: Ticket created successfully
                data:
                  id: 550e8400-e29b-41d4-a716-446655440000
                  status: open
        '400':
          description: >-
            Missing/invalid parameters. Body has success:false plus error and
            message.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - error
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                  message:
                    type: string
        '401':
          description: >-
            Missing or invalid API key (or session expired for session
            endpoints).
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - error
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                  message:
                    type: string
        '403':
          description: >-
            Authenticated but not authorized — wrong permissions or cross-tenant
            resource.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - error
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                  message:
                    type: string
        '404':
          description: Ticket id not found in this platform.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - error
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                  message:
                    type: string
        '429':
          description: >-
            Rate limited. Retry after the Retry-After seconds; see RateLimit-*
            headers.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - error
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                  message:
                    type: string
        '500':
          description: >-
            Unexpected server error. Body has success:false plus error and
            message.
          content:
            application/json:
              schema:
                type: object
                required:
                  - success
                  - error
                properties:
                  success:
                    type: boolean
                    example: false
                  error:
                    type: string
                  message:
                    type: string
      security:
        - apiKeyHeader: []
        - bearerAuth: []
components:
  securitySchemes:
    apiKeyHeader:
      type: apiKey
      in: header
      name: X-API-Key
      description: Preferred. API key value directly.
    bearerAuth:
      type: http
      scheme: bearer
      description: Alternative. API key as the bearer token.

````