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

# Buy Members

> Buy Members



## OpenAPI

````yaml post /market/buy
openapi: 3.0.0
info:
  description: VaultCord public API for developers to access resources
  version: 1.0.0
  title: VaultCord Developers API
  x-logo:
    url: https://cdn.vaultcord.com/logo.png
    backgroundColor: '#FFFFFF'
    altText: VaultCord logo
    href: https://vaultcord.com
servers:
  - description: VaultCord Developers API endpoint
    url: https://api.vaultcord.com
security:
  - bearerAuth: []
tags:
  - name: Servers
    description: Servers endpoints
  - name: Bots
    description: Bot endpoints
  - name: Backups
    description: Backup endpoints
  - name: Members
    description: Member endpoints
  - name: Alerts
    description: Alert endpoints
  - name: Whites
    description: Whitelist endpoints
paths:
  /market/buy:
    post:
      description: Buy Members
      operationId: buyMembers
      requestBody:
        description: Details for placing a member marketplace order
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - marketId
                - inviteLink
                - userEmail
                - amount
              properties:
                marketId:
                  type: integer
                  description: >-
                    The marketplace listing ID. You can get this by listing
                    sellers or viewing https://vaultcord.com/market?developers=1
                  example: 618
                inviteLink:
                  type: string
                  description: Send the Discord.gg invite link we should deliver members to
                  example: dyno
                userEmail:
                  type: string
                  description: >-
                    Buyer email. You SHOULD send a unique email every time
                    because we will show errors if a buyer attempts to buy same
                    members twice.
                  example: william@nelsoncybersecurity.com
                amount:
                  type: integer
                  description: The number of members being purchased.
                  example: 100
                budget:
                  type: integer
                  description: >-
                    (Optional) Limit the total cost of the order (since we've
                    been told some sellers are naughty and raise prices
                    suddenly) in cents. For example if you want the whole order
                    to cost less than $20, then it will show as 2000
                  example: 2000
      responses:
        '200':
          $ref: '#/components/responses/marketPurchased'
        '402':
          $ref: '#/components/responses/402'
components:
  responses:
    '402':
      description: You ran out of balance, needs to be refilled to buy more members.
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: false
              message:
                type: string
                example: Your balance is zero. Please top up balance on dashboard.
    marketPurchased:
      description: >-
        Member marketplace order information, use this data to start a market
        pull
      content:
        application/json:
          schema:
            type: object
            properties:
              success:
                type: boolean
                example: true
              data:
                $ref: '#/components/schemas/marketBuyObject'
  schemas:
    marketBuyObject:
      type: object
      properties:
        newBalance:
          type: integer
          description: >-
            Your remaining balance after the purchase. So if you have $5.50
            left, it would show as 550
          example: 550
        url:
          type: string
          example: >-
            https://dash.vaultcord.com/market-order?ref=c444b1c9fa354ffcbf3b6c99300fc0d9
          description: >-
            VaultCord invoice page with bot invite button (for branded
            integrations)
        inviteUrl:
          type: string
          example: >-
            https://discord.com/oauth2/authorize?client_id=155149108183695360&permissions=1&scope=bot&guild_id=203039963636301824
          description: Discord bot invite link (for white-label integrations)
        reference:
          type: string
          example: c444b1c9fa354ffcbf3b6c99300fc0d9
          description: >-
            Order reference. In case you want to build the URL manually rather
            than use our URL string.
        orderId:
          type: string
          example: API-c444b1c9fa354ffcbf3b6c99300fc0d9
          description: Order ID
        amount:
          type: integer
          description: Number of members purchased
          example: 100
        guildId:
          type: string
          description: Discord Guild (also called server) that the members will be sent to
          example: '203039963636301824'
        inviteCode:
          type: string
          description: Discord invite that the members will be sent to
          example: dyno
        userEmail:
          type: string
          description: >-
            Buyer email. You SHOULD send a unique email every time because we
            will show errors if a buyer attempts to buy same members twice.
          example: william@nelsoncybersecurity.com
        status:
          type: string
          description: Order status
          example: paid
        clientId:
          type: string
          description: >-
            The Discord bot ID in case you want to build the invite link
            yourself. Format:
            https://discord.com/oauth2/authorize?client_id=<id>&permissions=1&response_type=code&scope=bot
          example: '1377453171714293860'
        cost:
          type: integer
          description: >-
            Cost in number of cents. So if an order cost $1.50 then it would
            show as 150
          example: 150
        created_at:
          type: string
          example: 1751225426
          description: The creation date of the order, in unix timestamp (seconds)
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````