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

# Create embedded reward

> Places a reward order for a specific brand for immediate in-app delivery in your
app or website. The response includes a `gift_link` URL where the recipient
reveals their reward code.

Each call specifies `price_in_cents`, `brand_code`, and a unique supplied `id`,
and produces a single reward. All embedded rewards are automatically claimed and
cannot be canceled.




## OpenAPI

````yaml /api-reference/openapi.yaml post /embedded
openapi: 3.1.0
info:
  title: Giftbit API
  version: v1
  description: >
    Giftbit's REST API lets you automatically order rewards and send them to
    your

    recipients. Delivery can be handled either by links that integrate into
    another

    system's workflow, or by emails sent through the Giftbit system.


    Authenticate every request with a bearer token in the `Authorization`
    header.

    Only an HTTP `200` means success; all non-`200` responses share a common
    error body.
  contact:
    name: Giftbit Support
    email: testbed@giftbit.com
    url: https://www.giftbit.com/api-documentation
servers:
  - url: https://api-testbed.giftbit.com/papi/v1
    description: Testbed
  - url: https://api.giftbit.com/papi/v1
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Ping
    description: Test your authentication and check the health of the Giftbit API.
  - name: Brands
    description: List reward brands and retrieve extended information about a single brand.
  - name: Regions
    description: List the regions used to filter brands and request Full Catalog rewards.
  - name: Email Orders
    description: Order one or more rewards delivered to recipients by Giftbit email.
  - name: Shortlink Orders
    description: Order branded shortlink rewards that include a customized landing page.
  - name: Direct Link Orders
    description: >-
      Order minimally branded direct link rewards returned immediately in the
      response.
  - name: Embedded Rewards
    description: >-
      Order a single in-app reward for immediate delivery in your app or
      website.
  - name: Funds
    description: Retrieve your account balance and top it up with a credit card payment.
  - name: Rewards
    description: List, retrieve, resend, and cancel individual rewards.
paths:
  /embedded:
    post:
      tags:
        - Embedded Rewards
      summary: Create embedded reward
      description: >
        Places a reward order for a specific brand for immediate in-app delivery
        in your

        app or website. The response includes a `gift_link` URL where the
        recipient

        reveals their reward code.


        Each call specifies `price_in_cents`, `brand_code`, and a unique
        supplied `id`,

        and produces a single reward. All embedded rewards are automatically
        claimed and

        cannot be canceled.
      operationId: create-embedded-reward
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/EmbeddedCreateRequest'
            example:
              brand_code: itunesus
              price_in_cents: 2500
              id: myGift12345
      responses:
        '200':
          description: The embedded reward has been created.
          content:
            application/json:
              schema:
                type: object
                properties:
                  info:
                    $ref: '#/components/schemas/Info'
                  status:
                    type: integer
                  campaign:
                    type: object
                    properties:
                      uuid:
                        type: string
                      fees:
                        $ref: '#/components/schemas/Fees'
                      id:
                        type: string
                      brand_code:
                        type: string
                      price_in_cents:
                        type: integer
                  gift_link:
                    type: string
                    description: The unique reward link for embedding your reward.
              example:
                info:
                  code: INFO_CAMPAIGN_CREATED
                  name: Campaign Created
                  message: Campaign creation has begun.
                status: 200
                campaign:
                  uuid: 5ac9cea1234d47f5be3592ad0fe7cc76
                  id: gift12345
                  brand_code: itunesus
                  price_in_cents: 2500
                gift_link: >-
                  https://testbedapp.giftbit.com/embeddedRewards/index/5ac9cea1234abcf5be3592ad0fe7cc76
        '422':
          description: Invalid brand or brand/price combination.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: ERROR_CAMPAIGN_INVALID_BRAND
                  name: Invalid Brand or Brand/Price combination
                  message: >-
                    brand_code: itunesus - price_in_cents: 50000 - The
                    brand_code provided is not valid or not available for the
                    given price
                status: 422
components:
  schemas:
    EmbeddedCreateRequest:
      type: object
      required:
        - price_in_cents
        - brand_code
        - id
      properties:
        price_in_cents:
          type: integer
        brand_code:
          type: string
        id:
          type: string
          description: >-
            A unique client-assigned identifier for the order. Idempotent on
            retry.
    Info:
      type: object
      description: Status information returned on successful requests.
      properties:
        code:
          type: string
          description: An enum-style status code for the request.
        name:
          type: string
          description: Human-readable status name.
        message:
          type: string
          description: Request-context-specific message.
    Fees:
      type: object
      description: Information about the cost of the order and any associated fees.
      properties:
        cost_entries:
          type: array
          items:
            type: object
            properties:
              percentage:
                type: number
              fee_type:
                type: string
              amount_in_cents:
                type: integer
              currency:
                type: string
              tax_type:
                type: string
              tax_in_cents:
                type:
                  - integer
                  - 'null'
              number_of_gifts:
                type: integer
              fee_per_gift_in_cents:
                type: integer
        subtotal_in_cents:
          type: integer
        tax_in_cents:
          type: integer
        tax_type:
          type: string
        total_in_cents:
          type: integer
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/Error'
        status:
          type: integer
          description: An integer that matches the HTTP status code returned.
    Error:
      type: object
      properties:
        code:
          type: string
          description: An enum-style error code that will not change.
        name:
          type: string
          description: Human-readable error name.
        message:
          type: string
          description: Request-specific information about the error.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Send your API token prefixed by `Bearer ` in the `Authorization` header.

````