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

# Create resource

> Create a new resource with a client-provided ID and optional metadata. The ID must be at least 10 characters and cannot contain whitespace. Metadata is a free-form JSON object.



## OpenAPI

````yaml openapi.json post /v1/resources/
openapi: 3.1.0
info:
  title: Illumina Lab API
  description: AI-powered workflow orchestration API for building AI applications.
  version: 0.1.0
servers:
  - url: https://api.illuminalab.com
security: []
tags:
  - name: workflow
    description: Workflow execution endpoints for running AI conversations
  - name: resources
    description: Resource and thread management within specific resources
  - name: threads
    description: Direct thread access endpoints for the authenticated team
  - name: feedback
    description: Endpoints for providing feedback on AI responses and conversations
paths:
  /v1/resources/:
    post:
      tags:
        - resources
      summary: Create resource
      description: >-
        Create a new resource with a client-provided ID and optional metadata.
        The ID must be at least 10 characters and cannot contain whitespace.
        Metadata is a free-form JSON object.
      operationId: postV1Resources
      parameters:
        - name: authorization
          in: header
          required: true
          schema:
            type: string
            pattern: ^Bearer [\s\S]{0,}$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                id:
                  type: string
                  minLength: 10
                  pattern: ^\S+$
                  description: >-
                    Unique resource identifier (minimum 10 characters, no
                    whitespace)
                metadata:
                  default: {}
                  description: Free-form metadata object (optional)
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    $ref: '#/components/schemas/AnyValue'
              required:
                - id
                - metadata
              additionalProperties: false
          application/x-www-form-urlencoded:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                id:
                  type: string
                  minLength: 10
                  pattern: ^\S+$
                  description: >-
                    Unique resource identifier (minimum 10 characters, no
                    whitespace)
                metadata:
                  default: {}
                  description: Free-form metadata object (optional)
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    $ref: '#/components/schemas/AnyValue'
              required:
                - id
                - metadata
              additionalProperties: false
          multipart/form-data:
            schema:
              $schema: https://json-schema.org/draft/2020-12/schema
              type: object
              properties:
                id:
                  type: string
                  minLength: 10
                  pattern: ^\S+$
                  description: >-
                    Unique resource identifier (minimum 10 characters, no
                    whitespace)
                metadata:
                  default: {}
                  description: Free-form metadata object (optional)
                  type: object
                  propertyNames:
                    type: string
                  additionalProperties:
                    $ref: '#/components/schemas/AnyValue'
              required:
                - id
                - metadata
              additionalProperties: false
      responses:
        '200':
          description: Response for status 200
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  resource:
                    type: object
                    properties:
                      id:
                        type: string
                        description: Unique resource identifier
                      team_id:
                        type: string
                        description: Owning team ID
                      created_at:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: ISO timestamp of creation
                      updated_at:
                        anyOf:
                          - type: string
                          - type: 'null'
                        description: ISO timestamp of last update
                      metadata:
                        $ref: '#/components/schemas/AnyValue'
                        description: Resource metadata (JSON object)
                      working_memory:
                        $ref: '#/components/schemas/AnyValue'
                        description: Resource working memory state (JSON object)
                        anyOf:
                          - anyOf:
                              - type: string
                              - type: number
                              - type: boolean
                              - type: 'null'
                          - type: array
                            items:
                              $ref: '#/components/schemas/AnyValue'
                          - type: object
                            propertyNames:
                              type: string
                            additionalProperties:
                              $ref: '#/components/schemas/AnyValue'
                    required:
                      - id
                      - team_id
                      - created_at
                      - updated_at
                      - metadata
                      - working_memory
                    additionalProperties: false
                    description: The resource object
                required:
                  - resource
                additionalProperties: false
        '400':
          description: Error response following IlluminaError format
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Error code in format 'type:surface' (e.g.,
                          'not_found:database')
                      message:
                        type: string
                        description: Human-readable error message
                      details:
                        description: Additional error context
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          $ref: '#/components/schemas/AnyValue'
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
                description: Error response following IlluminaError format
        '401':
          description: Error response following IlluminaError format
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Error code in format 'type:surface' (e.g.,
                          'not_found:database')
                      message:
                        type: string
                        description: Human-readable error message
                      details:
                        description: Additional error context
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          $ref: '#/components/schemas/AnyValue'
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
                description: Error response following IlluminaError format
        '500':
          description: Error response following IlluminaError format
          content:
            application/json:
              schema:
                $schema: https://json-schema.org/draft/2020-12/schema
                type: object
                properties:
                  error:
                    type: object
                    properties:
                      code:
                        type: string
                        description: >-
                          Error code in format 'type:surface' (e.g.,
                          'not_found:database')
                      message:
                        type: string
                        description: Human-readable error message
                      details:
                        description: Additional error context
                        type: object
                        propertyNames:
                          type: string
                        additionalProperties:
                          $ref: '#/components/schemas/AnyValue'
                    required:
                      - code
                      - message
                    additionalProperties: false
                required:
                  - error
                additionalProperties: false
                description: Error response following IlluminaError format
components:
  schemas:
    AnyValue:
      description: JSON-compatible value
      anyOf:
        - anyOf:
            - type: string
            - type: number
            - type: boolean
            - type: 'null'
        - type: array
          items:
            $ref: '#/components/schemas/AnyValue'
        - type: object
          propertyNames:
            type: string
          additionalProperties:
            $ref: '#/components/schemas/AnyValue'

````