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

# Create a product



## OpenAPI

````yaml /api/openapi.yaml post /products
openapi: 3.1.0
info:
  title: LocalAds API
  version: 1.0.0
  description: Public API for LocalAds customer integrations.
servers:
  - url: https://makelocalads.com/api/v1
security:
  - apiKey: []
paths:
  /products:
    post:
      summary: Create a product
      operationId: createProduct
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProductCreate'
            example:
              brand_id: 1423f915-beca-4c53-a5e4-7c8c99537be9
              name: Hydrating Face Serum
              kind: skincare
              source_url: https://example.com/products/serum
              image_urls:
                - https://cdn.example.com/serum-front.jpg
      responses:
        '201':
          description: Product created.
          headers:
            Location:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Product'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '422':
          $ref: '#/components/responses/Unprocessable'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  schemas:
    ProductCreate:
      type: object
      additionalProperties: false
      required:
        - brand_id
        - name
      properties:
        brand_id:
          type: string
          format: uuid
        name:
          type: string
          minLength: 1
          maxLength: 200
        kind:
          type: string
          default: product
          minLength: 1
          maxLength: 100
        source_url:
          type:
            - string
            - 'null'
          format: uri
        image_urls:
          type: array
          maxItems: 20
          default: []
          items:
            type: string
            format: uri
    Product:
      type: object
      additionalProperties: false
      required:
        - id
        - brand_id
        - name
        - kind
        - source_url
        - image_urls
        - status
        - created_at
        - updated_at
      properties:
        id:
          type: string
          format: uuid
        brand_id:
          type: string
          format: uuid
        name:
          type: string
        kind:
          type: string
        source_url:
          type:
            - string
            - 'null'
          format: uri
        image_urls:
          type: array
          items:
            type: string
            format: uri
        status:
          type: string
          enum:
            - draft
            - processing
            - ready
            - failed
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    Problem:
      type: object
      required:
        - type
        - title
        - status
        - detail
        - code
        - request_id
      properties:
        type:
          type: string
          format: uri
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        code:
          type: string
        request_id:
          type: string
  responses:
    BadRequest:
      description: Invalid request.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Unauthorized:
      description: Missing or invalid API key.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Forbidden:
      description: The API key lacks the required permission.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    NotFound:
      description: Resource not found.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    Unprocessable:
      description: A product rule, plan limit, or credit limit blocked the request.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
    RateLimited:
      description: API key rate limit exceeded.
      headers:
        Retry-After:
          schema:
            type: integer
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      bearerFormat: lads_...

````