# /profile/v1.0/tenants/{tenantId}/workflows/{id}

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "API",
    "version": "v1.0"
  },
  "paths": {
    "/profile/v1.0/tenants/{tenantId}/workflows/{id}": {
      "put": {
        "tags": [
          "Workflows"
        ],
        "parameters": [
          {
            "name": "tenantId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          },
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "uuid"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json-patch+json": {
              "schema": {
                "$ref": "#/components/schemas/CM.Data.Core.Workflows.Api.Models.Workflows.ApiWorkflow"
              }
            },
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CM.Data.Core.Workflows.Api.Models.Workflows.ApiWorkflow"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/CM.Data.Core.Workflows.Api.Models.Workflows.ApiWorkflow"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/CM.Data.Core.Workflows.Api.Models.Workflows.ApiWorkflow"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "CM.Data.Core.Workflows.Api.Models.ApiGoal": {
        "type": "object",
        "properties": {
          "eventTypeId": {
            "type": "string",
            "format": "uuid"
          },
          "propertyName": {
            "type": "string",
            "nullable": true
          },
          "value": {
            "type": "string",
            "nullable": true
          },
          "stopWorkflowWhenGoalIsMet": {
            "type": "boolean"
          }
        },
        "additionalProperties": false
      },
      "CM.Data.Core.Workflows.Api.Models.Steps.ApiStep": {
        "type": "object",
        "properties": {
          "jsonType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "nextStepId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "summary": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      },
      "CM.Data.Core.Workflows.Api.Models.Workflows.ApiWorkflow": {
        "type": "object",
        "properties": {
          "jsonType": {
            "type": "string",
            "nullable": true,
            "readOnly": true
          },
          "id": {
            "type": "string",
            "format": "uuid"
          },
          "name": {
            "type": "string",
            "nullable": true
          },
          "consentPurposeId": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CM.Data.Core.Workflows.Api.Models.Steps.ApiStep"
            },
            "nullable": true
          },
          "goal": {
            "$ref": "#/components/schemas/CM.Data.Core.Workflows.Api.Models.ApiGoal"
          },
          "enabled": {
            "type": "boolean"
          },
          "isReady": {
            "type": "boolean"
          },
          "createdBy": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "createdOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "modifiedBy": {
            "type": "string",
            "format": "uuid",
            "nullable": true
          },
          "modifiedOn": {
            "type": "string",
            "format": "date-time",
            "nullable": true
          },
          "isFavorite": {
            "type": "boolean",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "_id": {
    "buffer": {
      "0": 98,
      "1": 176,
      "2": 58,
      "3": 189,
      "4": 133,
      "5": 153,
      "6": 20,
      "7": 1,
      "8": 49,
      "9": 81,
      "10": 32,
      "11": 10
    }
  }
}
```