# Watermark

## Delete

**delete** `/projects/{projectId}/watermark`

Delete the project's forced watermark configuration

### Path Parameters

- `projectId: string`

### Returns

- `deleted: boolean`

### Example

```http
curl https://api.cloud.scenario.com/v1/projects/$PROJECT_ID/watermark \
    -X DELETE \
    -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET"
```

#### Response

```json
{
  "deleted": true
}
```

## Delete Logo

**delete** `/projects/{projectId}/watermark/logo`

Remove the project's watermark logo, falling back to its configured text

### Path Parameters

- `projectId: string`

### Returns

- `watermark: object { id, createdAt, createdBy, 14 more }`

  Forced-watermark configuration stored at one scope.

  - `id: string`

    Stable identifier derived from level + scopeId

  - `createdAt: string`

    ISO-8601 creation timestamp

  - `createdBy: string`

    User id that last wrote the configuration

  - `enabled: boolean`

    Whether the watermark is enforced on assets generated in this scope. A
    disabled project configuration falls back to its team's.

  - `level: "project" or "team"`

    Scope this configuration applies to: team or project

    - `"project"`

    - `"team"`

  - `opacity: number`

    Mark opacity, 0.05 (barely visible) to 1 (opaque)

  - `placement: "bottom-left" or "bottom-right" or "center" or 3 more`

    Where the mark sits on the image

    - `"bottom-left"`

    - `"bottom-right"`

    - `"center"`

    - `"tiled"`

    - `"top-left"`

    - `"top-right"`

  - `rotation: number`

    Mark rotation in degrees, -90 to 90. 0 is horizontal.

  - `scale: number`

    Mark width as a fraction of the image width

  - `scopeId: string`

    The id of the team or project that owns this configuration

  - `spacing: number`

    Gap between repetitions, as a fraction of the mark's own size. Tiled
    placement only; 0 repeats the mark edge to edge.

  - `updatedAt: string`

    ISO-8601 last-update timestamp

  - `version: number`

    Bumped on every write.

  - `deletedAt: optional string`

    Set when the configuration has been deleted.

  - `logoIsOpaque: optional boolean`

    Whether the stored logo has no transparency at all.

    Recorded at upload so the UI can warn without decoding the image again: an
    opaque logo draws its whole rectangle, which a rotated tiled mark turns
    into a very visible diamond.

  - `logoKey: optional string`

    Where the uploaded logo lives, when one is set.

  - `text: optional string`

    Text rendered as the mark, when no logo is set

### Example

```http
curl https://api.cloud.scenario.com/v1/projects/$PROJECT_ID/watermark/logo \
    -X DELETE \
    -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET"
```

#### Response

```json
{
  "watermark": {
    "id": "id",
    "createdAt": "createdAt",
    "createdBy": "createdBy",
    "enabled": true,
    "level": "project",
    "opacity": 0,
    "placement": "bottom-left",
    "rotation": 0,
    "scale": 0,
    "scopeId": "scopeId",
    "spacing": 0,
    "updatedAt": "updatedAt",
    "version": 0,
    "deletedAt": "deletedAt",
    "logoIsOpaque": true,
    "logoKey": "logoKey",
    "text": "text"
  }
}
```

## Preview

**post** `/projects/{projectId}/watermark/preview`

Draw the given watermark settings on a sample image, without saving them

### Path Parameters

- `projectId: string`

### Body Parameters

- `opacity: optional number`

  Mark opacity, 0.05 (barely visible) to 1 (opaque)

- `placement: optional "bottom-left" or "bottom-right" or "center" or 3 more`

  Where the mark sits on the image

  - `"bottom-left"`

  - `"bottom-right"`

  - `"center"`

  - `"tiled"`

  - `"top-left"`

  - `"top-right"`

- `rotation: optional number`

  Mark rotation in degrees. 0 is horizontal, negative tilts it up.

- `scale: optional number`

  Mark width as a fraction of the image width

- `spacing: optional number`

  Gap between repetitions, as a fraction of the mark's own size. Only drawn
  for the tiled placement; 0 repeats the mark edge to edge.

- `text: optional string`

  Text to draw. Optional only because a logo can stand in for it.

### Returns

- `image: string`

  The sample image with the mark drawn on it, base64-encoded.

### Example

```http
curl https://api.cloud.scenario.com/v1/projects/$PROJECT_ID/watermark/preview \
    -H 'Content-Type: application/json' \
    -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" \
    -d '{}'
```

#### Response

```json
{
  "image": "image"
}
```

## Retrieve

**get** `/projects/{projectId}/watermark`

Get the project's forced watermark configuration

### Path Parameters

- `projectId: string`

### Returns

- `watermark: object { id, createdAt, createdBy, 14 more }`

  Forced-watermark configuration stored at one scope.

  - `id: string`

    Stable identifier derived from level + scopeId

  - `createdAt: string`

    ISO-8601 creation timestamp

  - `createdBy: string`

    User id that last wrote the configuration

  - `enabled: boolean`

    Whether the watermark is enforced on assets generated in this scope. A
    disabled project configuration falls back to its team's.

  - `level: "project" or "team"`

    Scope this configuration applies to: team or project

    - `"project"`

    - `"team"`

  - `opacity: number`

    Mark opacity, 0.05 (barely visible) to 1 (opaque)

  - `placement: "bottom-left" or "bottom-right" or "center" or 3 more`

    Where the mark sits on the image

    - `"bottom-left"`

    - `"bottom-right"`

    - `"center"`

    - `"tiled"`

    - `"top-left"`

    - `"top-right"`

  - `rotation: number`

    Mark rotation in degrees, -90 to 90. 0 is horizontal.

  - `scale: number`

    Mark width as a fraction of the image width

  - `scopeId: string`

    The id of the team or project that owns this configuration

  - `spacing: number`

    Gap between repetitions, as a fraction of the mark's own size. Tiled
    placement only; 0 repeats the mark edge to edge.

  - `updatedAt: string`

    ISO-8601 last-update timestamp

  - `version: number`

    Bumped on every write.

  - `deletedAt: optional string`

    Set when the configuration has been deleted.

  - `logoIsOpaque: optional boolean`

    Whether the stored logo has no transparency at all.

    Recorded at upload so the UI can warn without decoding the image again: an
    opaque logo draws its whole rectangle, which a rotated tiled mark turns
    into a very visible diamond.

  - `logoKey: optional string`

    Where the uploaded logo lives, when one is set.

  - `text: optional string`

    Text rendered as the mark, when no logo is set

### Example

```http
curl https://api.cloud.scenario.com/v1/projects/$PROJECT_ID/watermark \
    -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET"
```

#### Response

```json
{
  "watermark": {
    "id": "id",
    "createdAt": "createdAt",
    "createdBy": "createdBy",
    "enabled": true,
    "level": "project",
    "opacity": 0,
    "placement": "bottom-left",
    "rotation": 0,
    "scale": 0,
    "scopeId": "scopeId",
    "spacing": 0,
    "updatedAt": "updatedAt",
    "version": 0,
    "deletedAt": "deletedAt",
    "logoIsOpaque": true,
    "logoKey": "logoKey",
    "text": "text"
  }
}
```

## Update

**put** `/projects/{projectId}/watermark`

Create or update the project's forced watermark configuration

### Path Parameters

- `projectId: string`

### Body Parameters

- `enabled: boolean`

  Whether the watermark is enforced on assets generated in this scope. A
  disabled project configuration falls back to its team's.

- `opacity: optional number`

  Mark opacity, 0.05 (barely visible) to 1 (opaque)

- `placement: optional "bottom-left" or "bottom-right" or "center" or 3 more`

  Where the mark sits on the image

  - `"bottom-left"`

  - `"bottom-right"`

  - `"center"`

  - `"tiled"`

  - `"top-left"`

  - `"top-right"`

- `rotation: optional number`

  Mark rotation in degrees. 0 is horizontal, negative tilts it up.

- `scale: optional number`

  Mark width as a fraction of the image width

- `spacing: optional number`

  Gap between repetitions, as a fraction of the mark's own size. Only drawn
  for the tiled placement; 0 repeats the mark edge to edge.

- `text: optional string`

  Text rendered as the mark. Ignored while a logo is set.

### Returns

- `watermark: object { id, createdAt, createdBy, 14 more }`

  Forced-watermark configuration stored at one scope.

  - `id: string`

    Stable identifier derived from level + scopeId

  - `createdAt: string`

    ISO-8601 creation timestamp

  - `createdBy: string`

    User id that last wrote the configuration

  - `enabled: boolean`

    Whether the watermark is enforced on assets generated in this scope. A
    disabled project configuration falls back to its team's.

  - `level: "project" or "team"`

    Scope this configuration applies to: team or project

    - `"project"`

    - `"team"`

  - `opacity: number`

    Mark opacity, 0.05 (barely visible) to 1 (opaque)

  - `placement: "bottom-left" or "bottom-right" or "center" or 3 more`

    Where the mark sits on the image

    - `"bottom-left"`

    - `"bottom-right"`

    - `"center"`

    - `"tiled"`

    - `"top-left"`

    - `"top-right"`

  - `rotation: number`

    Mark rotation in degrees, -90 to 90. 0 is horizontal.

  - `scale: number`

    Mark width as a fraction of the image width

  - `scopeId: string`

    The id of the team or project that owns this configuration

  - `spacing: number`

    Gap between repetitions, as a fraction of the mark's own size. Tiled
    placement only; 0 repeats the mark edge to edge.

  - `updatedAt: string`

    ISO-8601 last-update timestamp

  - `version: number`

    Bumped on every write.

  - `deletedAt: optional string`

    Set when the configuration has been deleted.

  - `logoIsOpaque: optional boolean`

    Whether the stored logo has no transparency at all.

    Recorded at upload so the UI can warn without decoding the image again: an
    opaque logo draws its whole rectangle, which a rotated tiled mark turns
    into a very visible diamond.

  - `logoKey: optional string`

    Where the uploaded logo lives, when one is set.

  - `text: optional string`

    Text rendered as the mark, when no logo is set

### Example

```http
curl https://api.cloud.scenario.com/v1/projects/$PROJECT_ID/watermark \
    -X PUT \
    -H 'Content-Type: application/json' \
    -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" \
    -d '{
          "enabled": true
        }'
```

#### Response

```json
{
  "watermark": {
    "id": "id",
    "createdAt": "createdAt",
    "createdBy": "createdBy",
    "enabled": true,
    "level": "project",
    "opacity": 0,
    "placement": "bottom-left",
    "rotation": 0,
    "scale": 0,
    "scopeId": "scopeId",
    "spacing": 0,
    "updatedAt": "updatedAt",
    "version": 0,
    "deletedAt": "deletedAt",
    "logoIsOpaque": true,
    "logoKey": "logoKey",
    "text": "text"
  }
}
```

## Update Logo

**put** `/projects/{projectId}/watermark/logo`

Upload the project's watermark logo, used as the mark instead of its text

### Path Parameters

- `projectId: string`

### Body Parameters

- `logo: string`

  The logo image, base64-encoded, at most 1 MB and 4 megapixels once decoded.
  PNG, JPEG and WebP are accepted; SVG is refused. Stored as PNG.

### Returns

- `watermark: object { id, createdAt, createdBy, 14 more }`

  Forced-watermark configuration stored at one scope.

  - `id: string`

    Stable identifier derived from level + scopeId

  - `createdAt: string`

    ISO-8601 creation timestamp

  - `createdBy: string`

    User id that last wrote the configuration

  - `enabled: boolean`

    Whether the watermark is enforced on assets generated in this scope. A
    disabled project configuration falls back to its team's.

  - `level: "project" or "team"`

    Scope this configuration applies to: team or project

    - `"project"`

    - `"team"`

  - `opacity: number`

    Mark opacity, 0.05 (barely visible) to 1 (opaque)

  - `placement: "bottom-left" or "bottom-right" or "center" or 3 more`

    Where the mark sits on the image

    - `"bottom-left"`

    - `"bottom-right"`

    - `"center"`

    - `"tiled"`

    - `"top-left"`

    - `"top-right"`

  - `rotation: number`

    Mark rotation in degrees, -90 to 90. 0 is horizontal.

  - `scale: number`

    Mark width as a fraction of the image width

  - `scopeId: string`

    The id of the team or project that owns this configuration

  - `spacing: number`

    Gap between repetitions, as a fraction of the mark's own size. Tiled
    placement only; 0 repeats the mark edge to edge.

  - `updatedAt: string`

    ISO-8601 last-update timestamp

  - `version: number`

    Bumped on every write.

  - `deletedAt: optional string`

    Set when the configuration has been deleted.

  - `logoIsOpaque: optional boolean`

    Whether the stored logo has no transparency at all.

    Recorded at upload so the UI can warn without decoding the image again: an
    opaque logo draws its whole rectangle, which a rotated tiled mark turns
    into a very visible diamond.

  - `logoKey: optional string`

    Where the uploaded logo lives, when one is set.

  - `text: optional string`

    Text rendered as the mark, when no logo is set

### Example

```http
curl https://api.cloud.scenario.com/v1/projects/$PROJECT_ID/watermark/logo \
    -X PUT \
    -H 'Content-Type: application/json' \
    -u "$SCENARIO_SDK_API_KEY:SCENARIO_SDK_API_SECRET" \
    -d '{
          "logo": "logo"
        }'
```

#### Response

```json
{
  "watermark": {
    "id": "id",
    "createdAt": "createdAt",
    "createdBy": "createdBy",
    "enabled": true,
    "level": "project",
    "opacity": 0,
    "placement": "bottom-left",
    "rotation": 0,
    "scale": 0,
    "scopeId": "scopeId",
    "spacing": 0,
    "updatedAt": "updatedAt",
    "version": 0,
    "deletedAt": "deletedAt",
    "logoIsOpaque": true,
    "logoKey": "logoKey",
    "text": "text"
  }
}
```

## Domain Types

### Watermark Delete Response

- `WatermarkDeleteResponse object { deleted }`

  - `deleted: boolean`

### Watermark Delete Logo Response

- `WatermarkDeleteLogoResponse object { watermark }`

  - `watermark: object { id, createdAt, createdBy, 14 more }`

    Forced-watermark configuration stored at one scope.

    - `id: string`

      Stable identifier derived from level + scopeId

    - `createdAt: string`

      ISO-8601 creation timestamp

    - `createdBy: string`

      User id that last wrote the configuration

    - `enabled: boolean`

      Whether the watermark is enforced on assets generated in this scope. A
      disabled project configuration falls back to its team's.

    - `level: "project" or "team"`

      Scope this configuration applies to: team or project

      - `"project"`

      - `"team"`

    - `opacity: number`

      Mark opacity, 0.05 (barely visible) to 1 (opaque)

    - `placement: "bottom-left" or "bottom-right" or "center" or 3 more`

      Where the mark sits on the image

      - `"bottom-left"`

      - `"bottom-right"`

      - `"center"`

      - `"tiled"`

      - `"top-left"`

      - `"top-right"`

    - `rotation: number`

      Mark rotation in degrees, -90 to 90. 0 is horizontal.

    - `scale: number`

      Mark width as a fraction of the image width

    - `scopeId: string`

      The id of the team or project that owns this configuration

    - `spacing: number`

      Gap between repetitions, as a fraction of the mark's own size. Tiled
      placement only; 0 repeats the mark edge to edge.

    - `updatedAt: string`

      ISO-8601 last-update timestamp

    - `version: number`

      Bumped on every write.

    - `deletedAt: optional string`

      Set when the configuration has been deleted.

    - `logoIsOpaque: optional boolean`

      Whether the stored logo has no transparency at all.

      Recorded at upload so the UI can warn without decoding the image again: an
      opaque logo draws its whole rectangle, which a rotated tiled mark turns
      into a very visible diamond.

    - `logoKey: optional string`

      Where the uploaded logo lives, when one is set.

    - `text: optional string`

      Text rendered as the mark, when no logo is set

### Watermark Preview Response

- `WatermarkPreviewResponse object { image }`

  Response of the watermark preview routes.

  - `image: string`

    The sample image with the mark drawn on it, base64-encoded.

### Watermark Retrieve Response

- `WatermarkRetrieveResponse object { watermark }`

  - `watermark: object { id, createdAt, createdBy, 14 more }`

    Forced-watermark configuration stored at one scope.

    - `id: string`

      Stable identifier derived from level + scopeId

    - `createdAt: string`

      ISO-8601 creation timestamp

    - `createdBy: string`

      User id that last wrote the configuration

    - `enabled: boolean`

      Whether the watermark is enforced on assets generated in this scope. A
      disabled project configuration falls back to its team's.

    - `level: "project" or "team"`

      Scope this configuration applies to: team or project

      - `"project"`

      - `"team"`

    - `opacity: number`

      Mark opacity, 0.05 (barely visible) to 1 (opaque)

    - `placement: "bottom-left" or "bottom-right" or "center" or 3 more`

      Where the mark sits on the image

      - `"bottom-left"`

      - `"bottom-right"`

      - `"center"`

      - `"tiled"`

      - `"top-left"`

      - `"top-right"`

    - `rotation: number`

      Mark rotation in degrees, -90 to 90. 0 is horizontal.

    - `scale: number`

      Mark width as a fraction of the image width

    - `scopeId: string`

      The id of the team or project that owns this configuration

    - `spacing: number`

      Gap between repetitions, as a fraction of the mark's own size. Tiled
      placement only; 0 repeats the mark edge to edge.

    - `updatedAt: string`

      ISO-8601 last-update timestamp

    - `version: number`

      Bumped on every write.

    - `deletedAt: optional string`

      Set when the configuration has been deleted.

    - `logoIsOpaque: optional boolean`

      Whether the stored logo has no transparency at all.

      Recorded at upload so the UI can warn without decoding the image again: an
      opaque logo draws its whole rectangle, which a rotated tiled mark turns
      into a very visible diamond.

    - `logoKey: optional string`

      Where the uploaded logo lives, when one is set.

    - `text: optional string`

      Text rendered as the mark, when no logo is set

### Watermark Update Response

- `WatermarkUpdateResponse object { watermark }`

  - `watermark: object { id, createdAt, createdBy, 14 more }`

    Forced-watermark configuration stored at one scope.

    - `id: string`

      Stable identifier derived from level + scopeId

    - `createdAt: string`

      ISO-8601 creation timestamp

    - `createdBy: string`

      User id that last wrote the configuration

    - `enabled: boolean`

      Whether the watermark is enforced on assets generated in this scope. A
      disabled project configuration falls back to its team's.

    - `level: "project" or "team"`

      Scope this configuration applies to: team or project

      - `"project"`

      - `"team"`

    - `opacity: number`

      Mark opacity, 0.05 (barely visible) to 1 (opaque)

    - `placement: "bottom-left" or "bottom-right" or "center" or 3 more`

      Where the mark sits on the image

      - `"bottom-left"`

      - `"bottom-right"`

      - `"center"`

      - `"tiled"`

      - `"top-left"`

      - `"top-right"`

    - `rotation: number`

      Mark rotation in degrees, -90 to 90. 0 is horizontal.

    - `scale: number`

      Mark width as a fraction of the image width

    - `scopeId: string`

      The id of the team or project that owns this configuration

    - `spacing: number`

      Gap between repetitions, as a fraction of the mark's own size. Tiled
      placement only; 0 repeats the mark edge to edge.

    - `updatedAt: string`

      ISO-8601 last-update timestamp

    - `version: number`

      Bumped on every write.

    - `deletedAt: optional string`

      Set when the configuration has been deleted.

    - `logoIsOpaque: optional boolean`

      Whether the stored logo has no transparency at all.

      Recorded at upload so the UI can warn without decoding the image again: an
      opaque logo draws its whole rectangle, which a rotated tiled mark turns
      into a very visible diamond.

    - `logoKey: optional string`

      Where the uploaded logo lives, when one is set.

    - `text: optional string`

      Text rendered as the mark, when no logo is set

### Watermark Update Logo Response

- `WatermarkUpdateLogoResponse object { watermark }`

  - `watermark: object { id, createdAt, createdBy, 14 more }`

    Forced-watermark configuration stored at one scope.

    - `id: string`

      Stable identifier derived from level + scopeId

    - `createdAt: string`

      ISO-8601 creation timestamp

    - `createdBy: string`

      User id that last wrote the configuration

    - `enabled: boolean`

      Whether the watermark is enforced on assets generated in this scope. A
      disabled project configuration falls back to its team's.

    - `level: "project" or "team"`

      Scope this configuration applies to: team or project

      - `"project"`

      - `"team"`

    - `opacity: number`

      Mark opacity, 0.05 (barely visible) to 1 (opaque)

    - `placement: "bottom-left" or "bottom-right" or "center" or 3 more`

      Where the mark sits on the image

      - `"bottom-left"`

      - `"bottom-right"`

      - `"center"`

      - `"tiled"`

      - `"top-left"`

      - `"top-right"`

    - `rotation: number`

      Mark rotation in degrees, -90 to 90. 0 is horizontal.

    - `scale: number`

      Mark width as a fraction of the image width

    - `scopeId: string`

      The id of the team or project that owns this configuration

    - `spacing: number`

      Gap between repetitions, as a fraction of the mark's own size. Tiled
      placement only; 0 repeats the mark edge to edge.

    - `updatedAt: string`

      ISO-8601 last-update timestamp

    - `version: number`

      Bumped on every write.

    - `deletedAt: optional string`

      Set when the configuration has been deleted.

    - `logoIsOpaque: optional boolean`

      Whether the stored logo has no transparency at all.

      Recorded at upload so the UI can warn without decoding the image again: an
      opaque logo draws its whole rectangle, which a rotated tiled mark turns
      into a very visible diamond.

    - `logoKey: optional string`

      Where the uploaded logo lives, when one is set.

    - `text: optional string`

      Text rendered as the mark, when no logo is set
