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

# Create project mapping



## OpenAPI

````yaml /openapi.yaml post /project_mappings
openapi: 3.0.1
info:
  title: GetSpecs REST API
  description: REST API documentation for GetSpecs.
  version: 1.0.0
servers:
  - url: /v1
  - url: https://demo-api.getspecs.io/v1
security: []
paths:
  /project_mappings:
    post:
      tags:
        - ProjectMapping
      summary: Create project mapping
      operationId: project_mappings#create
      parameters: []
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/requestBodyProjectMappingCreate'
        required: true
      responses:
        '201':
          description: Created
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/project_mapping'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
        '422':
          description: Unprocessable Entity
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/error'
      security:
        - apiKey: []
          workspaceId: []
components:
  schemas:
    requestBodyProjectMappingCreate:
      type: object
      properties:
        type:
          type: string
          enum:
            - standard_fields
        name:
          type: string
        settings:
          oneOf:
            - $ref: '#/components/schemas/standard_fields_project_mapping_settings'
      required:
        - type
        - name
        - settings
    project_mapping:
      type: object
      description: >-
        A named, reusable mapping of item fields that projects link to.
        `settings` shape depends on `type`.
      properties:
        id:
          type: integer
        type:
          type: string
          enum:
            - standard_fields
        name:
          type: string
        settings:
          oneOf:
            - $ref: '#/components/schemas/standard_fields_project_mapping_settings'
        hidden_settings:
          type: array
          items:
            type: string
          description: >-
            Settings keys mapped to a column hidden from the current user's role
            (field access). Such a key reads as unmapped in `settings` (`null`,
            or the hidden slugs left out of a list); sending it back blank keeps
            the stored column. Empty when nothing is hidden.
        created_at:
          type: string
          format: date-time
        updated_at:
          type: string
          format: date-time
      required:
        - id
        - type
        - name
        - settings
        - hidden_settings
        - created_at
        - updated_at
    error:
      type: object
      properties:
        error:
          type: string
        errors:
          type: array
          items:
            type: object
            properties:
              field:
                type: string
                nullable: true
              code:
                type: string
                nullable: true
              message:
                type: string
            required:
              - message
    standard_fields_project_mapping_settings:
      type: object
      description: >-
        Settings for `type` standard_fields. Each value is an item field slug.
        Used by budget analysis (cost and client price, budget price) and by the
        package baseline (every key). The supplier is always the workspace's
        single contact column (`supplier`), so it isn't configurable. Optional
        keys may be missing or null. A column hidden from the current role reads
        as null (left out of `description_columns`); sending that key back blank
        keeps the hidden mapping.
      properties:
        cost_price_column:
          type: string
          nullable: true
          description: Slug of a number or percent column. Item total.
        client_price_column:
          type: string
          nullable: true
          description: Slug of a number or percent column. Item total.
        budget_price_column:
          type: string
          nullable: true
          description: >-
            Slug of a number or percent column. Budget price per unit; × Base
            QTY gives the itemized budget in budget analysis.
        unit_cost_price_column:
          type: string
          nullable: true
          description: Slug of a number or percent column. Price per unit.
        name_column:
          type: string
          nullable: true
          description: Slug of a string column.
        description_columns:
          type: array
          nullable: true
          maxItems: 10
          items:
            type: string
          description: >-
            Slugs of up to 10 columns of any type except images, docs and
            item_card, in the order they appear in the baseline description.
        unit_type_column:
          type: string
          nullable: true
          description: Slug of a string or list column.
        image_column:
          type: string
          nullable: true
          description: Slug of an images column.
      required:
        - cost_price_column
        - client_price_column
  securitySchemes:
    apiKey:
      type: apiKey
      name: authorization
      in: header
    workspaceId:
      type: apiKey
      name: X-Workspace-ID
      in: header

````

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