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

# Generate Struct

> Generate enrichment field definitions from a natural-language prompt.



## OpenAPI

````yaml https://api.sixtyfour.ai/openapi.json post /struct-builder/generate
openapi: 3.1.0
info:
  title: Sixtyfour API
  description: >-
    Intelligence API for People and Entities. Deploy AI agents that investigate,
    resolve identities, map relationships, and surface risk signals
  contact:
    name: Sixtyfour
    url: https://sixtyfour.ai/
    email: support@sixtyfour.ai
  license:
    name: Proprietary
  version: 1.0.0
servers:
  - url: https://api.sixtyfour.ai
    description: Production
security:
  - ApiKeyAuth: []
  - BearerAuth: []
tags:
  - name: Enrichment
    description: Find and enrich emails, phones, and LinkedIn for people and companies.
  - name: org-chart
    description: Discover people inside a company and build org charts.
  - name: Search
    description: Run deep and filter searches over Sixtyfour's data.
  - name: Workflow
    description: Create, run, and manage enrichment workflows.
  - name: Workflow Schedules
    description: Create and manage recurring schedules for workflows.
  - name: Account
    description: Manage and inspect your account and credit balance.
  - name: Intelligence
    description: Verify identity attributes such as age using high-tier OSINT research.
  - name: Atlas
    description: >-
      Read your Atlas investigations: attribution graph, workspace files,
      reports, and exports.
paths:
  /struct-builder/generate:
    post:
      tags:
        - StructBuilder
      summary: Generate Struct
      description: Generate enrichment field definitions from a natural-language prompt.
      operationId: generate_struct_struct_builder_generate_post
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/StructBuilderRequest'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StructBuilderResponse'
        '400':
          description: Request was rejected by the route's validation rules.
          content:
            application/json:
              schema:
                properties:
                  detail:
                    type: string
                type: object
              example:
                detail: Invalid request body
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              schema:
                properties:
                  detail:
                    type: string
                type: object
              example:
                detail: Invalid API key
        '403':
          description: Organization access is locked.
          content:
            application/json:
              schema:
                properties:
                  detail:
                    type: string
                type: object
              example:
                detail: >-
                  This organization no longer has access to Sixtyfour. Contact
                  your representative at Sixtyfour.
        '422':
          description: Request body failed validation.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        '500':
          description: Unexpected server error. Retry with backoff.
          content:
            application/json:
              schema:
                properties:
                  detail:
                    type: string
                type: object
              example:
                detail: Internal server error
        '503':
          description: >-
            The API key could not be checked, or the request could not be
            started, because a backing service is briefly unavailable or at
            capacity. Nothing was charged. Retry after the `Retry-After` header.
          content:
            application/json:
              schema:
                properties:
                  detail:
                    type: string
                type: object
              example:
                detail: Could not verify the API key right now. Retry shortly.
components:
  schemas:
    StructBuilderRequest:
      properties:
        description:
          type: string
          maxLength: 4000
          minLength: 1
          title: Description
          description: Natural language description of the fields to generate
        existing_struct:
          anyOf:
            - items:
                $ref: '#/components/schemas/StructField'
              type: array
            - type: 'null'
          title: Existing Struct
        block_type:
          anyOf:
            - type: string
              enum:
                - lead_enrichment
                - company_enrichment
                - linkedin_enrichment
                - research_agent
                - webhook
                - transform_data
            - type: 'null'
          title: Block Type
        allow_nested:
          type: boolean
          title: Allow Nested
          default: false
      type: object
      required:
        - description
      title: StructBuilderRequest
    StructBuilderResponse:
      properties:
        struct:
          items:
            $ref: '#/components/schemas/StructField'
          type: array
          title: Struct
      type: object
      required:
        - struct
      title: StructBuilderResponse
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
      example:
        detail:
          - loc:
              - body
              - target_company
              - domain
            msg: Field required
            type: missing
            input: null
            ctx: {}
    StructField:
      properties:
        name:
          type: string
          maxLength: 100000
          pattern: ^[a-zA-Z0-9_]+$
          title: Name
        description:
          type: string
          maxLength: 10000
          title: Description
        type:
          type: string
          enum:
            - string
            - str
            - int
            - integer
            - float
            - bool
            - boolean
            - dict
            - enum
            - list[enum]
            - object
            - object_list
            - list
            - list[str]
            - list[int]
            - list[float]
            - list[bool]
          title: Type
        options:
          anyOf:
            - items:
                type: string
                maxLength: 200
              type: array
              maxItems: 500
            - type: 'null'
          title: Options
        subfields:
          anyOf:
            - items:
                $ref: '#/components/schemas/StructSubField'
              type: array
            - type: 'null'
          title: Subfields
      type: object
      required:
        - name
        - description
        - type
      title: StructField
    ValidationError:
      title: ValidationError
      type: object
      required:
        - loc
        - msg
        - type
      properties:
        loc:
          type: array
          items:
            oneOf:
              - type: string
              - type: integer
          description: Path to the field that failed validation.
          example:
            - body
            - target_company
            - domain
        msg:
          type: string
          description: Human-readable error message.
          example: Field required
        type:
          type: string
          description: Error code (e.g. 'missing', 'value_error').
          example: missing
        input:
          description: The offending input value (any type, may be null).
          nullable: true
          example: null
        ctx:
          type: object
          description: Optional error context.
          additionalProperties: true
          example: {}
    StructSubField:
      properties:
        key:
          type: string
          maxLength: 100000
          pattern: ^[a-zA-Z0-9_]+$
          title: Key
        type:
          type: string
          enum:
            - string
            - int
            - float
            - bool
            - dict
          title: Type
        description:
          anyOf:
            - type: string
              maxLength: 10000
            - type: 'null'
          title: Description
      type: object
      required:
        - key
        - type
      title: StructSubField
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: Your Sixtyfour API key.
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        An OAuth access token from `POST /oauth/token`, sent as `Authorization:
        Bearer <token>`. An API key sent as a bearer token is refused with 401.
        When both headers are sent, the bearer token is used.

````

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