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

# Create new contest. For internal usage only



## OpenAPI

````yaml https://backend.swap.coffee/openapi post /v1/contests
openapi: 3.0.3
info:
  title: Swap Coffee API
  version: 1.0.0
servers:
  - url: https://backend.swap.coffee/
  - url: http://localhost:8080/
security:
  - {}
  - ApiKey: []
tags:
  - name: Entity
    description: Tokens, pools, DEXes, etc.
  - name: Routing
    description: >-
      Core functionality of the aggregation service. Build routes, get
      transactions, etc.
  - name: Strategies
    description: Limit orders, DCA, VCA, etc.
  - name: Yield
    description: >-
      Yield aggregator functionality. Provides and handles routes to pools with
      the best yield.
  - name: Referral
    description: Everything related to the referral program of swap.coffee.
  - name: Cashback
    description: Cashback programs conducted on swap.coffee.
  - name: Claim
    description: Claiming various rewards available on swap.coffee.
  - name: Contests
    description: Timed contests based on trading volumes for certain token-pairs.
  - name: Staking
    description: Responsible of managing staked funds, corresponding rewards, etc.
  - name: DEX
    description: Core functionality of the Coffee DEX service.
  - name: LiquidityProvisioning
    description: Everything related to liquidity provisioning in DEXes.
  - name: Boosts
    description: >-
      Functionality to support incentives and rewards for liquidity providers
      among all DEXes.
  - name: Profile
    description: Retrieve information about user profiles.
  - name: Partnership
    description: Various functionality for our partners.
  - name: Statistics
    description: Retrieve information about dex aggregation stats.
  - name: Ton
    description: Retrieve information about TON entities.
  - name: Auth
    description: Auth operations. For internal usage only.
paths:
  /v1/contests:
    post:
      tags:
        - Contests
      summary: Create new contest. For internal usage only
      operationId: createContest
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ApiContestInfo'
      responses:
        '200':
          description: Created contest information with id
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiContestInfoWithID'
        default:
          $ref: '#/components/responses/ApiError'
components:
  schemas:
    ApiContestInfo:
      type: object
      required:
        - title
        - description
        - references
        - conditions
        - rewards
        - start_time_unix
        - end_time_unix
        - image_url
        - total_reward
        - hidden
      properties:
        title:
          type: string
        description:
          type: string
        references:
          type: array
          items:
            $ref: '#/components/schemas/ApiContentReference'
        conditions:
          type: array
          items:
            $ref: '#/components/schemas/ApiDexSwapCondition'
        rewards:
          type: array
          items:
            $ref: '#/components/schemas/ApiContestReward'
        start_time_unix:
          type: integer
          format: int64
          description: in seconds
        end_time_unix:
          type: integer
          format: int64
          description: in seconds
        image_url:
          type: string
        total_reward:
          type: string
        hidden:
          type: boolean
    ApiContestInfoWithID:
      type: object
      required:
        - id
        - info
      properties:
        id:
          type: integer
          format: int32
        info:
          $ref: '#/components/schemas/ApiContestInfo'
    ApiContentReference:
      type: object
      required:
        - ref_name
        - ref_url
      properties:
        ref_name:
          type: string
        ref_url:
          type: string
    ApiDexSwapCondition:
      type: object
      required:
        - type
      properties:
        type:
          $ref: '#/components/schemas/ApiDexSwapConditionType'
        args:
          description: Arguments required to construct condition type
          type: array
          items:
            type: string
    ApiContestReward:
      type: object
      required:
        - reward
      properties:
        reward:
          type: string
        place:
          type: integer
          format: int32
        place_from:
          type: integer
          format: int32
        place_to:
          type: integer
          format: int32
    ApiDexSwapConditionType:
      type: string
      enum:
        - unique
        - listed
        - partner_address
        - tokens
        - tokens-pair
        - tokens-exact
        - users-whitelist
        - swap-tx-min-amount
        - blacklist-pair
        - blacklist-tokens
        - dexes
  responses:
    ApiError:
      description: Some error during request processing
      content:
        application/json:
          schema:
            type: object
            required:
              - error
            properties:
              error:
                type: string
  securitySchemes:
    ApiKey:
      type: apiKey
      name: X-Api-Key
      in: header

````