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

# Create delegation condition



## OpenAPI

````yaml post /v1/delegations/{delegationId}/conditions
openapi: 3.0.0
info:
  title: Decision APIs Specification
  description: Section for description
  version: '1.0'
  contact: {}
servers:
  - url: https://staging.api.us.aptlydone.com/decision
  - url: https://staging.api.eu.aptlydone.com/decision
  - url: https://api.us.aptlydone.com/decision
  - url: https://api.eu.aptlydone.com/decision
security: []
tags: []
paths:
  /v1/delegations/{delegationId}/conditions:
    post:
      tags:
        - delegations
      summary: Create delegation condition
      operationId: DelegationController_createConditionByDelegationId_v1
      parameters:
        - name: delegationId
          required: true
          in: path
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DelegationConditionCreateDto'
      responses:
        '201':
          description: Condition delegations created successfully
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/DelegationConditionResponseMappedDtoResponse
      security:
        - accessToken: []
components:
  schemas:
    DelegationConditionCreateDto:
      type: object
      properties:
        conditionName:
          type: string
          description: Name of condition
          example: Condition01
        conditionDescription:
          type: string
          description: Description of condition
          example: Lorem ipsum is a dummy discription
        isActive:
          type: boolean
          description: Status of condition delegation
          example: 'true'
      required:
        - conditionName
        - conditionDescription
        - isActive
    DelegationConditionResponseMappedDtoResponse:
      type: object
      properties:
        statusCode:
          type: number
          description: HTTP Status code
          example: 200
        timestamp:
          type: string
          description: Timestamp of the response
          example: '2026-01-08T06:33:50.384Z'
        message:
          type: string
          description: Response message
          example: Success
        data:
          description: Response data
          allOf:
            - $ref: '#/components/schemas/DelegationConditionResponseMappedDto'
      required:
        - statusCode
        - timestamp
        - message
        - data
    DelegationConditionResponseMappedDto:
      type: object
      properties:
        id:
          type: string
          example: 7df90da4-0634-40b9-abf5-6e97a222cfb8
          description: Condition mapping id
        delegationId:
          type: string
          example: 2sf90da4-0634-40b9-abf5-6e97a222rds8
          description: delegation Id
        conditionId:
          type: string
          example: 7sf90da4-0634-40b9-abf5-6e97a222ttt8
          description: Delegation condition Id
        isActive:
          type: boolean
          example: true/false
          description: status of that condition mapped to delegation Id
        updatedAt:
          format: date-time
          type: string
          description: Last updated date time for delegation condition
          example: '2025-03-05T11:49:50.577Z'
        createdAt:
          format: date-time
          type: string
          description: Creation date time for delegation condition
          example: '2025-03-05T11:49:50.577Z'
        conditionDetails:
          $ref: '#/components/schemas/DelegationConditionResponseDto'
      required:
        - id
        - delegationId
        - conditionId
        - isActive
        - updatedAt
        - createdAt
        - conditionDetails
    DelegationConditionResponseDto:
      type: object
      properties:
        id:
          type: string
          example: 7sf90da4-0634-40b9-abf5-6e97a222ttt8
          description: ' Delegation condition id'
        conditionName:
          type: string
          maxLength: 150
          example: test condition
          description: Delegation condition Name
        conditionDescription:
          type: string
          example: description of condition
          description: description of delegation condition
        updatedAt:
          format: date-time
          type: string
          description: Last updated date time for delegation condition
          example: '2025-03-05T11:49:50.577Z'
        createdAt:
          format: date-time
          type: string
          description: Creation date time for delegation condition
          example: '2025-03-05T11:49:50.577Z'
      required:
        - id
        - conditionName
        - conditionDescription
        - updatedAt
        - createdAt
  securitySchemes:
    accessToken:
      scheme: bearer
      bearerFormat: JWT
      type: http

````