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

# Create a Bid

> Place a bid for a customer on a lead type and location.

Creating a bid works just like adding one for the customer in Juiced. Juiced sets the bid's statuses, tells other bidders when they're outbid, and shows your API key's label on the customer's activity timeline. It needs the `bids:write` ability.

## Lead type

Send the lead type's ID as `lead_type`. [List Lead Types](https://docs.usejuiced.com/api-reference/endpoint/v1/lead-types-list.md) gives you the IDs and the scopes each one is open at. Bidding must be turned on for the lead type at the location's scope, or the bid is refused with a message naming the scopes that are open.

## Location and scope

`location` is `{country, state, county_fips}`, and how deep it goes sets the bid's [scope](https://docs.usejuiced.com/features/bidding.md#scopes).

| You send | Scope |
| - | - |
| `{"country": "US"}` | `nationwide` |
| `{"country": "US", "state": "TX"}` | `state` |
| `{"country": "US", "state": "TX", "county_fips": "48201"}` | `county` |

* **`country`** is a two-letter code and must be one of your [operating countries](https://docs.usejuiced.com/features/company-profile.md#operating-countries).
* **`state`** is the state, province or region abbreviation, and must be in that country.
* **`county_fips`** is the county's 5-digit FIPS code. County bids are US only. `state` is optional with a county, but when you send it, it must be the county's state.

When something's off, the error names the field, such as `location.country`, `location.state` or `location.county_fips`.

## Amount and minimum

`amount` is in dollars, with at most 2 decimal places. It can be below the lead type's minimum, as it can when you bid for a customer in Juiced. The bid comes back with `minimum` and `below_minimum` so you can spot it.

## Caps and budgets

Lead caps and budgets are only accepted when that limit is turned on under **Configure → Bidding** (see [Budgets and caps](https://docs.usejuiced.com/features/budgets-and-caps.md)). Any limit that's turned off is ignored. Budgets are in dollars.

Send `"paused": true` to create the bid paused.

## Retries and duplicates

Bid writes don't take an `Idempotency-Key`. A customer can only have one active bid per lead type and location, so if a create is sent twice, the second one returns `422` with `validation_failed`, and `error.bid` holds the ID of the bid that already exists. Change that bid with [Update a Bid](https://docs.usejuiced.com/api-reference/endpoint/v1/bids-update.md) instead.

Creates for the same customer, lead type and location run one at a time, so a retry sent while the first create is still running waits for it and then gets the `422` above. If it waits more than 10 seconds, it returns `429` with `rate_limited` and a `Retry-After` header. Send it again after that many seconds.

```json theme={null}
{
  "error": {
    "code": "validation_failed",
    "message": "This customer already has a bid on this lead type and location. Change that bid instead.",
    "errors": {
      "location": ["This customer already has a bid on this lead type and location. Change that bid instead."]
    },
    "bid": "bid_01h9z3c5e7g9j1k3m5n7p9r1st"
  },
  "version": "v1"
}
```

Check `can_receive_leads` and `blocked_by` on the new bid to see whether it can win leads yet. See [Get a Bid](https://docs.usejuiced.com/api-reference/endpoint/v1/bids-get.md#can-it-receive-leads).


## OpenAPI

````yaml POST /v1/customers/{id}/bids
openapi: 3.1.0
info:
  title: Juiced API
  description: >-
    API for submitting pings and leads to Juiced. Build on the v1 endpoints
    under `/v1`. The unversioned `/ping` and `/leads` endpoints are the frozen
    legacy contract and are deprecated.
  version: 1.0.0
servers:
  - url: https://usejuiced.com/api
    description: Production server
security:
  - Basic Auth: []
  - Bearer Token: []
tags:
  - name: v1
    description: The current API. Build on these endpoints.
  - name: Customers
    description: Create and look up your customers with an API key.
  - name: Leads
    description: Look up your leads and their details with an API key.
  - name: Funds
    description: >-
      Add funds to and remove funds from a customer's balance, and list their
      transactions.
  - name: Bids
    description: Manage your customers' bids and look up your lead types.
  - name: Legacy
    description: The frozen, deprecated unversioned endpoints.
paths:
  /v1/customers/{id}/bids:
    post:
      tags:
        - Bids
      summary: Create a bid
      description: >-
        Places a bid for the customer on a lead type and location. The
        location's depth sets the scope.


        This endpoint doesn't take an `Idempotency-Key`. A customer can only
        have one active bid per lead type and location, so a repeated create
        returns `422` with the existing bid's ID in `error.bid`.


        Requires the `bids:write` ability.
      operationId: createCustomerBidV1
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            pattern: ^cus_[0-9a-z]{26}$
          description: The customer's ID.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BidCreateRequestV1'
            examples:
              County bid:
                summary: County bid
                value:
                  lead_type: ltyp_01jbx7q3s5v7w9y1a3c5e7g9hk
                  location:
                    country: US
                    state: TX
                    county_fips: '48201'
                  amount: 25
              State bid:
                summary: State bid
                value:
                  lead_type: ltyp_01jbx7q3s5v7w9y1a3c5e7g9hk
                  location:
                    country: US
                    state: TX
                  amount: 15
              Nationwide bid, paused:
                summary: Nationwide bid, paused
                value:
                  lead_type: ltyp_01jbx7q3s5v7w9y1a3c5e7g9hk
                  location:
                    country: US
                  amount: 5
                  paused: true
      responses:
        '201':
          description: Bid created.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerBidResponseV1'
              example:
                data:
                  id: bid_01h9z3c5e7g9j1k3m5n7p9r1st
                  customer: cus_01jbx8p4r6t8v0x2z4b6d8f0hk
                  lead_type: ltyp_01jbx7q3s5v7w9y1a3c5e7g9hk
                  scope: county
                  location:
                    country: US
                    state: TX
                    county: Harris
                    county_fips: '48201'
                  amount: 25
                  minimum: 10
                  below_minimum: false
                  daily_lead_cap: null
                  weekly_lead_cap: null
                  monthly_lead_cap: null
                  daily_budget: null
                  weekly_budget: null
                  monthly_budget: null
                  paused: false
                  status: active
                  can_receive_leads: true
                  blocked_by: []
                  archived_at: null
                  created_at: '2026-11-20T15:04:05Z'
                  updated_at: '2026-11-20T15:04:05Z'
                version: v1
        '401':
          $ref: '#/components/responses/ApiKeyUnauthenticatedV1'
        '403':
          description: >-
            The key lacks the ability this endpoint needs, your plan doesn't
            include the API, or your account is locked for an unpaid
            subscription.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorV1'
              examples:
                Missing ability:
                  summary: Missing ability
                  value:
                    error:
                      code: bad_request
                      message: This API key does not have the bids:write ability.
                    version: v1
                Plan without the API:
                  summary: Plan without the API
                  value:
                    error:
                      code: bad_request
                      message: >-
                        The API is not included in your plan. Upgrade to a paid
                        plan to use it.
                    version: v1
                Account locked:
                  summary: Account locked
                  value:
                    error:
                      code: bad_request
                      message: This workspace is locked until its subscription is paid.
                    version: v1
        '404':
          description: No customer in your account has this ID.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorV1'
              example:
                error:
                  code: not_found
                  message: No customer matches this request.
                version: v1
        '422':
          description: >-
            The bid failed validation. A bid that already exists carries its ID
            in `error.bid`.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorV1'
              examples:
                Bid already exists:
                  summary: Bid already exists
                  value:
                    error:
                      code: validation_failed
                      message: >-
                        This customer already has a bid on this lead type and
                        location. Change that bid instead.
                      errors:
                        location:
                          - >-
                            This customer already has a bid on this lead type
                            and location. Change that bid instead.
                      bid: bid_01h9z3c5e7g9j1k3m5n7p9r1st
                    version: v1
                Country you don't operate in:
                  summary: Country you don't operate in
                  value:
                    error:
                      code: validation_failed
                      message: >-
                        The country must be one of your operating countries, as
                        a 2-letter ISO code.
                      errors:
                        location.country:
                          - >-
                            The country must be one of your operating countries,
                            as a 2-letter ISO code.
                    version: v1
                County outside the US:
                  summary: County outside the US
                  value:
                    error:
                      code: validation_failed
                      message: >-
                        County bids are only available in the US for now. Bid on
                        the whole state or country instead.
                      errors:
                        location.county_fips:
                          - >-
                            County bids are only available in the US for now.
                            Bid on the whole state or country instead.
                    version: v1
                Bidding off at this scope:
                  summary: Bidding off at this scope
                  value:
                    error:
                      code: validation_failed
                      message: >-
                        Bidding on this lead type is only open by state or
                        nationwide.
                      errors:
                        location:
                          - >-
                            Bidding on this lead type is only open by state or
                            nationwide.
                    version: v1
                Unknown lead type:
                  summary: Unknown lead type
                  value:
                    error:
                      code: validation_failed
                      message: No active lead type has this ID.
                      errors:
                        lead_type:
                          - No active lead type has this ID.
                    version: v1
        '429':
          description: >-
            The key sent too many requests, or another change to this customer's
            bid on the same lead type and location was still running after 10
            seconds. Retry after `Retry-After` seconds.
          headers:
            X-Request-Id:
              $ref: '#/components/headers/XRequestId'
            Retry-After:
              $ref: '#/components/headers/RetryAfter'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorV1'
              examples:
                Too many requests:
                  summary: Too many requests
                  value:
                    error:
                      code: rate_limited
                      message: >-
                        Too many requests. Retry after the number of seconds in
                        the Retry-After header.
                    version: v1
                Another change still running:
                  summary: Another change still running
                  value:
                    error:
                      code: rate_limited
                      message: >-
                        Another change to this bid, or to this customer's bid on
                        this lead type and location, is still running. Retry
                        after the number of seconds in the Retry-After header.
                    version: v1
        '500':
          $ref: '#/components/responses/ServerErrorV1'
      security:
        - API Key: []
components:
  schemas:
    BidCreateRequestV1:
      title: Bid Create Request
      type: object
      required:
        - lead_type
        - location
        - amount
      properties:
        lead_type:
          type: string
          description: >-
            The lead type's ID, from [List Lead
            Types](/api-reference/endpoint/v1/lead-types-list). Bidding must be
            turned on for it at the location's scope.
        location:
          $ref: '#/components/schemas/BidLocationInputV1'
        amount:
          type: number
          minimum: 0.01
          maximum: 21474836
          description: >-
            What the customer bids for a lead, in dollars with at most 2 decimal
            places. It can be below the lead type's minimum, which
            `below_minimum` flags.
        daily_lead_cap:
          type:
            - integer
            - 'null'
          minimum: 1
          maximum: 2147483647
          description: >-
            Most leads this bid gets a day. Only accepted when the bid daily
            lead cap is turned on in **Configure → Bidding**, and ignored
            otherwise. Send `null` to remove it.
        weekly_lead_cap:
          type:
            - integer
            - 'null'
          minimum: 1
          maximum: 2147483647
          description: >-
            Most leads this bid gets a week. Only accepted when the bid weekly
            lead cap is turned on in **Configure → Bidding**, and ignored
            otherwise. Send `null` to remove it.
        monthly_lead_cap:
          type:
            - integer
            - 'null'
          minimum: 1
          maximum: 2147483647
          description: >-
            Most leads this bid gets a month. Only accepted when the bid monthly
            lead cap is turned on in **Configure → Bidding**, and ignored
            otherwise. Send `null` to remove it.
        daily_budget:
          type:
            - number
            - 'null'
          minimum: 1
          maximum: 21474836
          description: >-
            Most this bid spends a day, in dollars with at most 2 decimal
            places. Only accepted when the bid daily budget is turned on in
            **Configure → Bidding**, and ignored otherwise. Send `null` to
            remove it.
        weekly_budget:
          type:
            - number
            - 'null'
          minimum: 1
          maximum: 21474836
          description: >-
            Most this bid spends a week, in dollars with at most 2 decimal
            places. Only accepted when the bid weekly budget is turned on in
            **Configure → Bidding**, and ignored otherwise. Send `null` to
            remove it.
        monthly_budget:
          type:
            - number
            - 'null'
          minimum: 1
          maximum: 21474836
          description: >-
            Most this bid spends a month, in dollars with at most 2 decimal
            places. Only accepted when the bid monthly budget is turned on in
            **Configure → Bidding**, and ignored otherwise. Send `null` to
            remove it.
        paused:
          type: boolean
          default: false
          description: Create the bid paused.
    CustomerBidResponseV1:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/CustomerBidV1'
        version:
          type: string
          enum:
            - v1
    ErrorV1:
      title: Error
      type: object
      required:
        - error
        - version
      properties:
        error:
          type: object
          required:
            - code
            - message
          properties:
            code:
              type: string
              enum:
                - unauthenticated
                - validation_failed
                - quota_reached
                - ping_mismatch
                - idempotency_conflict
                - idempotency_in_progress
                - idempotency_reserved
                - idempotency_version_mismatch
                - rate_limited
                - not_found
                - method_not_allowed
                - bad_request
                - server_error
              description: Machine-readable error code. Branch on this, not on `message`.
            message:
              type: string
              description: Human-readable explanation.
            errors:
              type: object
              description: Only with `validation_failed`. Messages keyed by field.
              additionalProperties:
                type: array
                items:
                  type: string
            lead_id:
              type: string
              pattern: ^lead_[0-9a-z]{26}$
              description: >-
                Only with `idempotency_version_mismatch`. The lead the
                `transaction_id` already created.
            bid:
              type: string
              pattern: ^bid_[0-9a-z]{26}$
              description: >-
                Only when a customer already has an active bid on that lead type
                and location. That bid's ID, so you can change it instead.
        version:
          type: string
          enum:
            - v1
          description: Always `v1`.
    BidLocationInputV1:
      title: Bid Location
      type: object
      required:
        - country
      additionalProperties: false
      description: >-
        Where the bid applies. Its depth sets the scope. `country` alone is a
        nationwide bid, adding `state` makes a state bid, and adding
        `county_fips` makes a county bid.
      properties:
        country:
          type: string
          minLength: 2
          maxLength: 2
          description: Two-letter code of one of your operating countries, like `US`.
        state:
          type:
            - string
            - 'null'
          maxLength: 8
          description: >-
            The state, province or region abbreviation, like `TX`. It must be in
            `country`.
        county_fips:
          type:
            - string
            - 'null'
          pattern: ^\d{5}$
          description: >-
            A US county's 5-digit FIPS code, like `48201`. County bids are US
            only. `state` is optional with it, but must be the county's state
            when you send it.
    CustomerBidV1:
      title: Customer Bid
      type: object
      properties:
        id:
          type: string
          pattern: ^bid_[0-9a-z]{26}$
          description: The bid's public ID.
        customer:
          type: string
          pattern: ^cus_[0-9a-z]{26}$
          description: The customer who placed the bid.
        lead_type:
          type: string
          pattern: ^ltyp_[0-9a-z]{26}$
          description: The lead type the bid is on.
        scope:
          type: string
          enum:
            - county
            - state
            - nationwide
          description: How wide the bid reaches, set by the depth of its location.
        location:
          $ref: '#/components/schemas/LocationV1'
        amount:
          type: number
          description: What the customer bids for a lead, in dollars.
        minimum:
          type:
            - number
            - 'null'
          description: >-
            The lead type's minimum bid at this scope, in dollars. `null` when
            the lead type has no bidding set up at this scope.
        below_minimum:
          type: boolean
          description: >-
            Whether `amount` is under `minimum`. That's allowed, as it is in
            Juiced.
        daily_lead_cap:
          type:
            - integer
            - 'null'
          description: Most leads this bid gets a day.
        weekly_lead_cap:
          type:
            - integer
            - 'null'
          description: Most leads this bid gets a week.
        monthly_lead_cap:
          type:
            - integer
            - 'null'
          description: Most leads this bid gets a month.
        daily_budget:
          type:
            - number
            - 'null'
          description: Most this bid spends a day, in dollars.
        weekly_budget:
          type:
            - number
            - 'null'
          description: Most this bid spends a week, in dollars.
        monthly_budget:
          type:
            - number
            - 'null'
          description: Most this bid spends a month, in dollars.
        paused:
          type: boolean
          description: Whether the bid is paused.
        status:
          type: string
          enum:
            - active
            - limited
            - exhausted
            - paused
            - archived
          description: >-
            The bid's status, as Juiced shows it. See [Display
            status](/features/bidding#display-status). It doesn't cover the
            customer's own account, so check `can_receive_leads` too.
        can_receive_leads:
          type: boolean
          description: >-
            Whether the bid can win leads right now. It runs the same check
            distribution does.
        blocked_by:
          type: array
          items:
            type: string
            enum:
              - bid_archived
              - bid_paused
              - insufficient_funds
              - bid_cap_reached
              - bid_budget_reached
              - customer_paused
              - customer_archived
              - customer_cap_reached
              - customer_budget_reached
              - bidding_not_set_up
          description: >-
            Every reason the bid can't receive leads right now, bid-level
            reasons first. Empty when `can_receive_leads` is `true`. See [Get a
            Bid](/api-reference/endpoint/v1/bids-get) for what each code means.
        archived_at:
          type:
            - string
            - 'null'
          description: When the bid was archived.
          format: date-time
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    LocationV1:
      title: Location
      type: object
      properties:
        country:
          type:
            - string
            - 'null'
          description: Two-letter country code, like `US`.
        state:
          type:
            - string
            - 'null'
          description: State, province or region abbreviation, like `TX`.
        county:
          type:
            - string
            - 'null'
          description: County name, like `Harris`.
        county_fips:
          type:
            - string
            - 'null'
          description: The county's 5-digit FIPS code, like `48201`.
  headers:
    XRequestId:
      description: >-
        Unique ID for this request, sent on every v1 response (errors included).
        Quote it when contacting support.
      schema:
        type: string
        pattern: ^req_[0-9a-z]{26}$
        example: req_01jbx8k6y3a5c7e9g1j3m5p7rt
    RetryAfter:
      description: Seconds to wait before retrying.
      schema:
        type: integer
        example: 30
  responses:
    ApiKeyUnauthenticatedV1:
      description: The API key is missing, unknown, revoked or expired.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorV1'
          example:
            error:
              code: unauthenticated
              message: >-
                Missing or invalid API key. Send an active jz_live_ key as a
                bearer token.
            version: v1
    ServerErrorV1:
      description: >-
        Something went wrong on our side. Quote the `X-Request-Id` header when
        contacting support.
      headers:
        X-Request-Id:
          $ref: '#/components/headers/XRequestId'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorV1'
          example:
            error:
              code: server_error
              message: >-
                An unexpected error occurred. Quote the X-Request-Id header when
                contacting support.
            version: v1
  securitySchemes:
    Basic Auth:
      type: http
      scheme: basic
      description: >-
        Use your source's API key as the username and API secret as the
        password. Base64 encode the credentials in the format
        `api_key:api_secret`.
    Bearer Token:
      type: http
      scheme: bearer
      description: Use a bearer token generated for your source.
    API Key:
      type: http
      scheme: bearer
      description: >-
        An API key from **Configure → API Keys** (it starts with `jz_live_`),
        sent as a bearer token. See [API Keys](/api-reference/api-keys).

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.