# Activate workflow

> Turn a workflow on.

Source: https://docs.mycrmsim.com/docs/automations/activate-workflow

```http
POST https://backend.mysmsgateway.app/api/v1/ext/workflows/{id}/activate
```

- Category: myCRMSIM Automations / Automations
- Auth: Bearer access token
- Scope: `automations.write`

From now on its triggers start it and it sends to real contacts. A workflow with an **Auto Trigger** runs once, right now, as it is switched on (activating one that is already active does not run it again).

## Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | number | yes | Workflow id. Example: `1201` |
| `workspace_id` | body | number | yes | A workspace of the installer. Example: `7` |

## Request body

```json
{
  "workspace_id": 7
}
```

## Response 200

OK

```json
{
  "success": true,
  "message": "Workflow activated",
  "data": {
    "id": 1201,
    "status": "active"
  }
}
```

## Response 401

Missing or invalid token

```json
{
  "success": false,
  "message": "Invalid or expired access token."
}
```

## Response 403

Missing scope

```json
{
  "success": false,
  "message": "Missing scope(s): automations.write. This integration was granted: …"
}
```

## Response 404

workspace_id does not exist or is not the installer's (same response for both)

```json
{
  "success": false,
  "message": "Workspace not found or not accessible to this token"
}
```

## Response 404

The workflow does not exist, is not the installer's, or is in another workspace

```json
{
  "success": false,
  "message": "Workflow not found or not accessible to this token"
}
```
