> ## 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 photoshoot template



## OpenAPI

````yaml /api/openapi.yaml post /templates
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:
  /templates:
    post:
      summary: Create a photoshoot template
      operationId: createPhotoshootTemplate
      parameters:
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TemplateCreate'
      responses:
        '201':
          description: >-
            Photoshoot template created. Each shot preserves its supplied
            image's aspect ratio.
          headers:
            Location:
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TemplateDetail'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          $ref: '#/components/responses/Conflict'
        '429':
          $ref: '#/components/responses/RateLimited'
components:
  parameters:
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      description: >-
        Optional caller-generated value that prevents duplicate generation when
        retrying the same request.
      schema:
        type: string
        minLength: 1
        maxLength: 255
  schemas:
    TemplateCreate:
      type: object
      additionalProperties: false
      required:
        - product_id
        - title
        - image_urls
      properties:
        product_id:
          type: string
          format: uuid
        title:
          type: string
          minLength: 1
          maxLength: 160
        image_urls:
          type: array
          minItems: 1
          maxItems: 24
          description: >-
            HTTPS images for the template pack. LocalAds retains a stable copy
            of each accepted image and preserves its aspect ratio.
          items:
            type: string
            format: uri
            pattern: ^https://
    TemplateDetail:
      allOf:
        - $ref: '#/components/schemas/TemplateBase'
        - type: object
          required:
            - shots
          properties:
            shots:
              type: array
              items:
                $ref: '#/components/schemas/TemplateShot'
      unevaluatedProperties: false
    TemplateBase:
      type: object
      required:
        - id
        - brand_id
        - title
        - preview_url
        - shot_count
        - created_at
        - updated_at
      properties:
        id:
          type: string
        brand_id:
          type: string
          format: uuid
        title:
          type: string
        preview_url:
          type:
            - string
            - 'null'
          format: uri
        shot_count:
          type: integer
          minimum: 1
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
    TemplateShot:
      type: object
      additionalProperties: false
      required:
        - id
        - position
        - preview_url
        - width
        - height
        - description
      properties:
        id:
          type: string
          format: uuid
        position:
          type: integer
          minimum: 1
        preview_url:
          type: string
          format: uri
        width:
          type: integer
          minimum: 1
        height:
          type: integer
          minimum: 1
        description:
          type:
            - string
            - 'null'
    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'
    Conflict:
      description: >-
        Idempotency key conflict, an identical request still in progress, or a
        brand already exists for the requested website.
      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_...

````