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

# Upload file

> Upload file for later use. 
For now, this is limited only to images.



## OpenAPI

````yaml openapi/promotion-v2.json POST /v2/campaigns/file
openapi: 3.0.4
info:
  title: Offer (Promotion) Api
  version: v2
servers:
  - url: https://{host}/promotion
    description: Your Lobyco environment
    variables:
      host:
        default: your-environment.lobyco.net
        description: >-
          The API host for your Lobyco environment. Replace it with the host you
          were given — this placeholder does not resolve.
security:
  - Bearer: []
paths:
  /v2/campaigns/file:
    post:
      tags:
        - Campaigns
      summary: Upload file
      description: |-
        Upload file for later use. 
        For now, this is limited only to images.
      requestBody:
        content:
          multipart/form-data:
            schema:
              required:
                - File
              type: object
              properties:
                File:
                  type: string
                  format: binary
            encoding:
              File:
                style: form
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UploadFileResponse'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebServiceError'
components:
  schemas:
    UploadFileResponse:
      type: object
      properties:
        fileUrl:
          type: string
          nullable: true
      additionalProperties: false
    WebServiceError:
      required:
        - message
        - name
      type: object
      properties:
        name:
          minLength: 1
          type: string
        message:
          minLength: 1
          type: string
        details:
          nullable: true
      additionalProperties: false
  securitySchemes:
    Bearer:
      type: apiKey
      description: >-
        Opaque Authorization header using the Bearer scheme. Example:
        "Authorization: Bearer {token}"
      name: Authorization
      in: header

````