---
updatedAt: 2026-05-04T21:43:38.000Z
agentTools:
  projectIndex: https://docs.toqua.ai/llms.txt
---

# Update notification subscriptions for a recipient

Enable or disable specific notification types for a recipient.

Only include the notification types you want to change in the request body.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "Toqua API",
    "contact": {
      "name": "Toqua",
      "url": "https://toqua.ai/",
      "email": "admin@toqua.ai"
    },
    "version": "0.26"
  },
  "servers": [
    {
      "url": "https://api.toqua.ai",
      "description": "Toqua API"
    }
  ],
  "paths": {
    "/notifications/recipients/{recipient_id}/subscriptions": {
      "patch": {
        "tags": [
          "Notifications"
        ],
        "summary": "Update notification subscriptions for a recipient",
        "description": "Enable or disable specific notification types for a recipient.\n\nOnly include the notification types you want to change in the request body.",
        "operationId": "update_notification_subscriptions",
        "security": [
          {
            "APIKeyHeader": []
          },
          {
            "HTTPBearer": []
          }
        ],
        "parameters": [
          {
            "name": "recipient_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Recipient Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/NotificationSubscriptionUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/NotificationRecipientResponse"
                }
              }
            }
          },
          "403": {
            "description": "Forbidden"
          },
          "404": {
            "description": "Not Found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "NotificationRecipientResponse": {
        "properties": {
          "email": {
            "type": "string",
            "maxLength": 255,
            "format": "email",
            "title": "Email",
            "description": "Email address of the recipient.",
            "examples": [
              "user@acme-shipping.com"
            ]
          },
          "name": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 255
              },
              {
                "type": "null"
              }
            ],
            "title": "Name",
            "description": "Full name of the recipient.",
            "examples": [
              "John Doe"
            ]
          },
          "recipient_id": {
            "type": "string",
            "title": "Recipient ID",
            "description": "Unique identifier for the recipient.",
            "examples": [
              "123e4567-e89b-12d3-a456-426614174000"
            ]
          },
          "fleet_id": {
            "type": "string",
            "title": "Fleet ID",
            "description": "Fleet ID that the recipient belongs to.",
            "examples": [
              "acme-shipping"
            ]
          },
          "subscriptions": {
            "$ref": "#/components/schemas/NotificationSubscriptions",
            "title": "Subscriptions",
            "description": "Map of notification types to subscription status."
          },
          "created_at": {
            "type": "string",
            "title": "Created At",
            "description": "Timestamp when the recipient was created.",
            "examples": [
              "2025-10-10T12:00:00+00:00"
            ]
          }
        },
        "type": "object",
        "required": [
          "email",
          "recipient_id",
          "fleet_id",
          "subscriptions",
          "created_at"
        ],
        "title": "NotificationRecipientResponse",
        "description": "Schema for notification recipient response."
      },
      "NotificationSubscriptionDetail": {
        "properties": {
          "is_subscribed": {
            "type": "boolean",
            "title": "Is Subscribed",
            "description": "Whether the recipient is subscribed to this notification type."
          },
          "ship_filters": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ship Filters",
            "description": "IMO numbers of ships this subscription applies to. null means all ships in the fleet.",
            "examples": [
              null,
              [
                "9537771",
                "9537772"
              ]
            ]
          }
        },
        "type": "object",
        "required": [
          "is_subscribed"
        ],
        "title": "NotificationSubscriptionDetail",
        "description": "Subscription status for a single notification type, with optional ship filter."
      },
      "NotificationSubscriptionUpdate": {
        "properties": {
          "subscriptions": {
            "$ref": "#/components/schemas/NotificationSubscriptionsUpdate",
            "title": "Subscriptions",
            "description": "Map of notification types to subscription status. Only include types you want to update.",
            "examples": [
              {
                "model_updates": {
                  "is_subscribed": false
                }
              },
              {
                "fleet_digests": {
                  "is_subscribed": true
                },
                "voyage_reports": {
                  "is_subscribed": true,
                  "ship_filters": [
                    "9537771"
                  ]
                }
              },
              {
                "model_updates": {}
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "subscriptions"
        ],
        "title": "NotificationSubscriptionUpdate",
        "description": "Schema for updating notification subscriptions."
      },
      "NotificationSubscriptionUpdateDetail": {
        "properties": {
          "is_subscribed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Subscribed",
            "description": "Whether to subscribe or unsubscribe. Omit to leave unchanged."
          },
          "ship_filters": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ship Filters",
            "description": "IMO numbers of ships this subscription applies to. Omit the field to leave unchanged. Set to null or [] to clear the filter (= all ships). Set to [imo1, imo2, ...] for an explicit allowlist."
          }
        },
        "type": "object",
        "title": "NotificationSubscriptionUpdateDetail",
        "description": "Detail for updating a single notification subscription."
      },
      "NotificationSubscriptions": {
        "properties": {
          "model_updates": {
            "$ref": "#/components/schemas/NotificationSubscriptionDetail",
            "title": "Model Updates",
            "description": "Subscription status for model updates."
          },
          "fleet_digests": {
            "$ref": "#/components/schemas/NotificationSubscriptionDetail",
            "title": "Fleet Digests",
            "description": "Subscription status for fleet digests."
          },
          "voyage_reports": {
            "$ref": "#/components/schemas/NotificationSubscriptionDetail",
            "title": "Voyage Reports",
            "description": "Subscription status for voyage reports."
          },
          "data_quality_digests": {
            "$ref": "#/components/schemas/NotificationSubscriptionDetail",
            "title": "Data Quality Digests",
            "description": "Subscription status for data quality digests."
          },
          "chartering_reports": {
            "$ref": "#/components/schemas/NotificationSubscriptionDetail",
            "title": "Chartering Reports",
            "description": "Subscription status for chartering reports."
          },
          "threshold_violation_exceeded": {
            "$ref": "#/components/schemas/NotificationSubscriptionDetail",
            "title": "Threshold Violation Exceeded",
            "description": "Subscription status for threshold violation exceeded notifications."
          }
        },
        "type": "object",
        "required": [
          "model_updates",
          "fleet_digests",
          "voyage_reports",
          "data_quality_digests",
          "chartering_reports",
          "threshold_violation_exceeded"
        ],
        "title": "NotificationSubscriptions"
      },
      "NotificationSubscriptionsUpdate": {
        "properties": {
          "model_updates": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NotificationSubscriptionUpdateDetail"
              },
              {
                "type": "null"
              }
            ],
            "title": "Model Updates",
            "description": "Update for model updates subscription. Omit to leave unchanged."
          },
          "fleet_digests": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NotificationSubscriptionUpdateDetail"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fleet Digests",
            "description": "Update for fleet digests subscription. Omit to leave unchanged."
          },
          "voyage_reports": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NotificationSubscriptionUpdateDetail"
              },
              {
                "type": "null"
              }
            ],
            "title": "Voyage Reports",
            "description": "Update for voyage reports subscription. Omit to leave unchanged."
          },
          "data_quality_digests": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NotificationSubscriptionUpdateDetail"
              },
              {
                "type": "null"
              }
            ],
            "title": "Data Quality Digests",
            "description": "Update for data quality digests subscription. Omit to leave unchanged."
          },
          "chartering_reports": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NotificationSubscriptionUpdateDetail"
              },
              {
                "type": "null"
              }
            ],
            "title": "Chartering Reports",
            "description": "Update for chartering reports subscription. Omit to leave unchanged."
          },
          "threshold_violation_exceeded": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/NotificationSubscriptionUpdateDetail"
              },
              {
                "type": "null"
              }
            ],
            "title": "Threshold Violation Exceeded",
            "description": "Update for threshold violation exceeded subscription. Omit to leave unchanged."
          }
        },
        "type": "object",
        "title": "NotificationSubscriptionsUpdate",
        "description": "Schema for partial subscription updates (all fields optional for PATCH)."
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "APIKeyHeader": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key"
      },
      "HTTPBearer": {
        "type": "http",
        "scheme": "bearer"
      }
    }
  },
  "externalDocs": {
    "description": "API Documentation",
    "url": "https://docs.toqua.ai"
  }
}
```