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

# Create Brand From Url Legacy

> Preserve the pre-async success shape for cached and external clients.

New AITasker clients use ``POST /from-url/jobs``. Keeping this route's
top-level ``BrandResponse`` avoids a staggered Railway/Vercel rollout
sending older bundles to ``/brands/undefined`` when they read ``brand.id``.
The wait is intentionally capped at 60 seconds: accepted slow jobs continue
durably after a 504 instead of pinning a Railway request for 20 minutes.



## OpenAPI

````yaml /openapi.json post /api/v1/brands/from-url
openapi: 3.1.0
info:
  title: AITasker
  version: 0.1.0
servers: []
security: []
paths:
  /api/v1/brands/from-url:
    post:
      tags:
        - Brands
        - Brands
      summary: Create Brand From Url Legacy
      description: >-
        Preserve the pre-async success shape for cached and external clients.


        New AITasker clients use ``POST /from-url/jobs``. Keeping this route's

        top-level ``BrandResponse`` avoids a staggered Railway/Vercel rollout

        sending older bundles to ``/brands/undefined`` when they read
        ``brand.id``.

        The wait is intentionally capped at 60 seconds: accepted slow jobs
        continue

        durably after a 504 instead of pinning a Railway request for 20 minutes.
      operationId: create_brand_from_url_legacy_api_v1_brands_from_url_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BrandFromUrlRequest'
        required: true
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BrandResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    BrandFromUrlRequest:
      properties:
        url:
          type: string
          maxLength: 500
          minLength: 5
          title: Url
        name:
          anyOf:
            - type: string
              maxLength: 100
            - type: 'null'
          title: Name
        market:
          anyOf:
            - $ref: '#/components/schemas/BrandMarketSelection'
            - type: 'null'
      type: object
      required:
        - url
      title: BrandFromUrlRequest
    BrandResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
        name:
          type: string
          title: Name
        website_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Website Url
        logo_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Logo Url
        industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Industry
        brand_classification:
          anyOf:
            - $ref: '#/components/schemas/BrandClassification'
            - type: 'null'
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        partner_slug:
          anyOf:
            - type: string
            - type: 'null'
          title: Partner Slug
        default_location_code:
          anyOf:
            - type: integer
            - type: 'null'
          title: Default Location Code
        default_language_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Default Language Code
        country_code:
          anyOf:
            - type: string
            - type: 'null'
          title: Country Code
        country_name:
          anyOf:
            - type: string
            - type: 'null'
          title: Country Name
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
        brand_kit_count:
          type: integer
          title: Brand Kit Count
          default: 0
        audit_count:
          type: integer
          title: Audit Count
          default: 0
        competitor_count:
          type: integer
          title: Competitor Count
          default: 0
      type: object
      required:
        - id
        - name
        - created_at
        - updated_at
      title: BrandResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    BrandMarketSelection:
      properties:
        country_code:
          type: string
          maxLength: 2
          minLength: 2
          title: Country Code
        country_name:
          type: string
          maxLength: 100
          minLength: 1
          title: Country Name
        location_code:
          type: integer
          title: Location Code
        language_locale:
          type: string
          maxLength: 10
          minLength: 2
          title: Language Locale
        language_code:
          type: string
          maxLength: 10
          minLength: 2
          title: Language Code
      type: object
      required:
        - country_code
        - country_name
        - location_code
        - language_locale
        - language_code
      title: BrandMarketSelection
    BrandClassification:
      properties:
        primary_industry:
          anyOf:
            - type: string
            - type: 'null'
          title: Primary Industry
        industries:
          items:
            type: string
          type: array
          title: Industries
        business_models:
          items:
            type: string
          type: array
          title: Business Models
        version:
          anyOf:
            - type: string
            - type: 'null'
          title: Version
        source:
          anyOf:
            - type: string
            - type: 'null'
          title: Source
        classified_at:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Classified At
        needs_review:
          type: boolean
          title: Needs Review
          default: false
      type: object
      title: BrandClassification
      description: >-
        A versioned multi-label brand classification.


        Industries describe what the brand sells or does. Business models
        describe

        how it operates independently of industry. Keeping those dimensions

        separate prevents the historical ``E-Commerce`` pseudo-industry from

        replacing the brand's real product industry.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````