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

# Create Profile

> Create a simulation profile for an agent.

`fields` accepts any string keys and values. Profile names must be unique
within an agent.



## OpenAPI

````yaml https://api.usetuner.ai/public/openapi.json post /api/v1/workspaces/{workspace_id}/agents/{agent_id}/simulation-profiles
openapi: 3.1.0
info:
  title: My Public API
  version: 1.0.0
servers:
  - url: https://api.usetuner.ai
security: []
tags:
  - name: calls
    x-group: Calls
  - name: workspaces
    x-group: Workspaces
  - name: agent-settings
    x-group: Agent Settings
  - name: agents
    x-group: Agents
  - name: simulation
    x-group: Simulation
  - name: providers
    x-group: Providers
paths:
  /api/v1/workspaces/{workspace_id}/agents/{agent_id}/simulation-profiles:
    post:
      tags:
        - simulation
      summary: Create Profile
      description: >-
        Create a simulation profile for an agent.


        `fields` accepts any string keys and values. Profile names must be
        unique

        within an agent.
      operationId: >-
        create_simulation_profile_api_v1_workspaces__workspace_id__agents__agent_id__simulation_profiles_post
      parameters:
        - name: agent_id
          in: path
          required: true
          schema:
            type: integer
            description: Tuner's internal numeric ID for the agent.
            title: Agent Id
          description: Tuner's internal numeric ID for the agent.
        - name: workspace_id
          in: path
          required: true
          schema:
            type: integer
            description: Workspace ID. Find this in Workspace > General Settings.
            title: Workspace Id
          description: Workspace ID. Find this in Workspace > General Settings.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SimulationProfileInput'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SimulationProfileResponse'
        '401':
          description: Missing or invalid API key.
          content:
            application/json:
              example:
                detail: Not authenticated
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: You do not have access to this workspace.
          content:
            application/json:
              example:
                detail: User does not have access to workspace 42
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Agent not found.
          content:
            application/json:
              example:
                detail: Agent with ID 17 not found
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          description: A profile with this name already exists for this agent.
          content:
            application/json:
              example:
                detail: >-
                  A simulation profile named 'Frustrated caller' already exists
                  for this agent.
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - Bearer: []
components:
  schemas:
    SimulationProfileInput:
      properties:
        name:
          type: string
          maxLength: 255
          minLength: 1
          title: Name
        fields:
          additionalProperties:
            type: string
          type: object
          title: Fields
      type: object
      required:
        - name
      title: SimulationProfileInput
      description: Input schema for creating or updating a simulation profile.
    SimulationProfileResponse:
      properties:
        id:
          type: integer
          title: Id
        agent_id:
          type: integer
          title: Agent Id
        name:
          type: string
          title: Name
        fields:
          additionalProperties:
            type: string
          type: object
          title: Fields
        created_at:
          type: string
          format: date-time
          title: Created At
        updated_at:
          type: string
          format: date-time
          title: Updated At
      type: object
      required:
        - id
        - agent_id
        - name
        - fields
        - created_at
        - updated_at
      title: SimulationProfileResponse
      description: Response schema for a single simulation profile.
    ErrorResponse:
      properties:
        detail:
          type: string
          title: Detail
          description: Human-readable description of what went wrong.
      type: object
      required:
        - detail
      title: ErrorResponse
      description: Error body returned when a request fails.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    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:
    Bearer:
      type: http
      description: >-
        Use Tuner API key (tr_api_...) or user session token. Find your API key
        in Workspace Settings > API Keys.
      scheme: bearer

````