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

# Run Attachment Skin Analysis

> Run skin analysis on an attachment image and persist the result.



## OpenAPI

````yaml post /attachments/{attachment_id}/skin-analysis
openapi: 3.1.0
info:
  title: Decoda API
  description: External API documentation for the Decoda Health platform.
  version: '1.0'
servers: []
security: []
paths:
  /attachments/{attachment_id}/skin-analysis:
    post:
      tags:
        - Attachments
      summary: Run Attachment Skin Analysis
      description: Run skin analysis on an attachment image and persist the result.
      operationId: >-
        run_attachment_skin_analysis_attachments__attachment_id__skin_analysis_post
      parameters:
        - name: TENANT
          in: header
          required: true
          schema:
            type: string
            title: Tenant
          description: The tenant you are making this request on behalf of
        - name: API-KEY
          in: header
          required: true
          schema:
            type: string
            title: Api-Key
          description: Your api key
        - name: attachment_id
          in: path
          required: true
          schema:
            type: string
            title: Attachment Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AttachmentSkinAnalysisResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    AttachmentSkinAnalysisResponse:
      properties:
        id:
          type: string
          title: Id
        noteAttachmentId:
          type: string
          title: Noteattachmentid
        overallSkinAge:
          type: integer
          title: Overallskinage
        overallScore:
          type: integer
          title: Overallscore
        ageDifference:
          anyOf:
            - type: integer
            - type: 'null'
          title: Agedifference
        summary:
          type: string
          title: Summary
        zones:
          items:
            $ref: '#/components/schemas/SkinZoneScore'
          type: array
          title: Zones
        concerns:
          items:
            $ref: '#/components/schemas/SkinConcern'
          type: array
          title: Concerns
        recommendations:
          items:
            $ref: '#/components/schemas/TreatmentRecommendation'
          type: array
          title: Recommendations
        createdDate:
          anyOf:
            - type: string
            - type: 'null'
          title: Createddate
      type: object
      required:
        - id
        - noteAttachmentId
        - overallSkinAge
        - overallScore
        - summary
        - zones
        - concerns
        - recommendations
      title: AttachmentSkinAnalysisResponse
      description: Response for skin analysis persisted on a note attachment.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    SkinZoneScore:
      properties:
        zone:
          type: string
          title: Zone
        estimatedAge:
          type: integer
          title: Estimatedage
        score:
          type: integer
          title: Score
        primaryConcern:
          type: string
          title: Primaryconcern
        detail:
          type: string
          title: Detail
      type: object
      required:
        - zone
        - estimatedAge
        - score
        - primaryConcern
        - detail
      title: SkinZoneScore
    SkinConcern:
      properties:
        concern:
          type: string
          title: Concern
        severity:
          type: string
          title: Severity
        description:
          type: string
          title: Description
      type: object
      required:
        - concern
        - severity
        - description
      title: SkinConcern
    TreatmentRecommendation:
      properties:
        title:
          type: string
          title: Title
        description:
          type: string
          title: Description
        priority:
          type: string
          title: Priority
        category:
          type: string
          title: Category
        serviceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Serviceid
        displayPrice:
          anyOf:
            - type: integer
            - type: 'null'
          title: Displayprice
        displayPriceMax:
          anyOf:
            - type: integer
            - type: 'null'
          title: Displaypricemax
        priceStartsAt:
          type: boolean
          title: Pricestartsat
          default: false
        duration:
          anyOf:
            - type: integer
            - type: 'null'
          title: Duration
      type: object
      required:
        - title
        - description
        - priority
        - category
      title: TreatmentRecommendation
    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

````