# REST API - Create Recording Request

## Endpoint
`POST https://api.screenreply.com/public/integration/{workspaceId}/recordings`

## Description
Generates a new recording session and optionally sends an email invitation to start recording.

## Path Parameters
| Parameter | Type | Description |
|-----------|------|-------------|
| workspaceId | String (UUID) | Unique identifier of your workspace (required) |

## Request Body (application/json)
| Field | Type | Description |
|-------|------|-------------|
| email | String | Email of the person being asked to record. Optional - if omitted, no email notification sent. |
| direction | String | Recording type. **Allowed values:** `REQUEST` (ask someone to record), `RESPONSE` (record your own screen). **Required.** |
| tags | Array of Strings | Tags to categorize recording (e.g., `["bug-report", "jira-123"]`) |
| notifications | Array of Objects | Notification objects. Each must contain `type: "EMAIL"` and `value: "client@company.com"`. |
| comment | String | Internal comment/notes. **Never visible to the client or end-user.** |

## Response
- **Status:** 201 Created
- **Body:**
```json
{
  "id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
  "direction": "REQUEST",
  "status": "NEW",
  "tags": ["bug-report", "jira-123"],
  "notifications": [
    {
      "type": "EMAIL",
      "value": "client@company.com"
    }
  ],
  "comment": "User reported crash on login screen (internal note)",
  "createdDate": "2026-02-21T10:00:00Z"
}
```

## Example Request
```bash
curl -X POST https://api.screenreply.com/public/integration/{workspaceId}/recordings \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "developer@company.com",
    "direction": "REQUEST",
    "tags": ["bug-report", "jira-123"],
    "notifications": [
      {
        "type": "EMAIL",
        "value": "client@company.com"
      }
    ],
    "comment": "User reported crash on login screen (internal note)"
  }'
```