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

# Operations

> Manage flow operations

Operations are the building blocks within flows.

## List Operations

```bash theme={null}
GET /operations
```

**Example:**

```bash theme={null}
curl "https://your-directus-instance.com/operations" \
  -H "Authorization: Bearer YOUR_TOKEN"
```

## Get Operation

```bash theme={null}
GET /operations/:id
```

## Create Operation

```bash theme={null}
POST /operations
```

**Request Body:**

```json theme={null}
{
  "name": "Send Email",
  "key": "send_email",
  "type": "mail",
  "position_x": 10,
  "position_y": 10,
  "options": {
    "to": "user@example.com",
    "subject": "Welcome",
    "body": "Hello {{$trigger.name}}!"
  },
  "flow": "flow-uuid"
}
```

## Update Operation

```bash theme={null}
PATCH /operations/:id
```

## Delete Operation

```bash theme={null}
DELETE /operations/:id
```

## Operation Types

* **Condition** - Conditional logic
* **Exec** - Execute Node.js code
* **Item Create** - Create items
* **Item Read** - Read items
* **Item Update** - Update items
* **Item Delete** - Delete items
* **Log** - Log messages
* **Mail** - Send emails
* **Notification** - Send notifications
* **Request** - HTTP requests
* **Sleep** - Delay execution
* **Transform** - Transform data
* **Trigger** - Trigger another flow

## Operation Properties

<ResponseField name="id" type="string">
  Operation UUID
</ResponseField>

<ResponseField name="name" type="string">
  Operation name
</ResponseField>

<ResponseField name="key" type="string">
  Unique key for referencing
</ResponseField>

<ResponseField name="type" type="string">
  Operation type
</ResponseField>

<ResponseField name="flow" type="string">
  Parent flow UUID
</ResponseField>

<ResponseField name="options" type="object">
  Operation-specific configuration
</ResponseField>

## Next Steps

<CardGroup cols={2}>
  <Card title="Flows" icon="bolt" href="/api/rest/flows">
    Manage flows
  </Card>

  <Card title="Flow Automation" icon="diagram-project" href="/features/flows-automation">
    Learn about automation
  </Card>
</CardGroup>
