notiflowsDocs
Feed

Update feed entry state

Update a single feed entry's state. Use this to mark notifications as seen, read, clicked, or archived.

Idempotent Semantics:

State changes are idempotent - calling the same update multiple times has no additional effect:

  • seen: true → Sets seen_at timestamp if currently null (preserves original timestamp if already set)
  • read: true → Sets read_at timestamp if currently null
  • clicked: true → Sets clicked_at timestamp if currently null
  • archived: true → Sets archived_at timestamp if currently null
  • archived: false → Clears archived_at (unarchives the entry)

Invalid Operations:

These will return 409 Conflict:

  • seen: false - Cannot unmark as seen
  • read: false - Cannot unmark as read
  • clicked: false - Cannot unmark as clicked

Only archived can be set to false to unarchive an entry.

PATCH
/channels/{channel_id}/feed/entries/{entry_id}

Authorization

ApiKeyAuth UserKeyAuth
x-notiflows-api-key<token>

Your project's public API key. Safe to include in client-side code. Starts with pk_.

In: header

x-notiflows-user-key<token>

JWT token identifying the current user. Must be signed with your Application Signing Key (RS256).

Required claims:

  • sub: User's external_id (required)
  • exp: Expiration timestamp (recommended)
  • iat: Issued at timestamp (recommended)

Development Mode: Use x-notiflows-user-id header with the user's external_id instead (insecure, testing only).

In: header

Path Parameters

channel_id*string

Channel ID (UUID)

entry_id*string

Entry ID (UUID)

Request Body

application/json

State changes to apply

archived?boolean

Set to true to archive, false to unarchive.

clicked?boolean

Set to true to mark as clicked. Cannot be set to false.

read?boolean

Set to true to mark as read. Cannot be set to false.

seen?boolean

Set to true to mark as seen. Cannot be set to false.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X PATCH "https://api.notiflows.com/user/channels/01HQXYZ123456789ABCDEFGHIJ/feed/entries/01HQXYZ123456789ABCDEFGHIJ" \  -H "Content-Type: application/json" \  -d '{    "read": true  }'
{
  "actor": {
    "avatar": "https://example.com/avatars/admin.jpg",
    "external_id": "admin_001",
    "first_name": "Admin",
    "id": "01HQABC987654321ZYXWVUTSRQ"
  },
  "archived_at": null,
  "clicked_at": null,
  "created_at": "2024-01-15T10:30:00Z",
  "data": {
    "action_url": "https://example.com/orders/12345",
    "body": "Your order #12345 has shipped!",
    "title": "Order Shipped"
  },
  "id": "01HQXYZ123456789ABCDEFGHIJ",
  "read_at": null,
  "seen_at": null,
  "sent_at": "2024-01-15T10:30:00Z",
  "status": "unseen",
  "topic": "order-updates"
}
{
  "error": {
    "code": "not_found",
    "details": {
      "allowed_statuses": [
        "string"
      ],
      "allowed_transitions": [
        "string"
      ],
      "auth": "api_key",
      "current_status": "string",
      "fields": [
        {
          "field": "email",
          "message": "can't be blank",
          "reason": "required"
        }
      ],
      "id": "string",
      "idempotency_key": "string",
      "limit": 0,
      "param": "string",
      "reason": "string",
      "required_scope": "string",
      "resource": "string",
      "retry_after": 0,
      "window": "string"
    },
    "message": "User not found",
    "request_id": "req_abc123",
    "status": 404,
    "type": "https://docs.notiflows.com/errors/not_found"
  }
}
{
  "error": {
    "code": "not_found",
    "details": {
      "allowed_statuses": [
        "string"
      ],
      "allowed_transitions": [
        "string"
      ],
      "auth": "api_key",
      "current_status": "string",
      "fields": [
        {
          "field": "email",
          "message": "can't be blank",
          "reason": "required"
        }
      ],
      "id": "string",
      "idempotency_key": "string",
      "limit": 0,
      "param": "string",
      "reason": "string",
      "required_scope": "string",
      "resource": "string",
      "retry_after": 0,
      "window": "string"
    },
    "message": "User not found",
    "request_id": "req_abc123",
    "status": 404,
    "type": "https://docs.notiflows.com/errors/not_found"
  }
}
{
  "error": {
    "code": "not_found",
    "details": {
      "allowed_statuses": [
        "string"
      ],
      "allowed_transitions": [
        "string"
      ],
      "auth": "api_key",
      "current_status": "string",
      "fields": [
        {
          "field": "email",
          "message": "can't be blank",
          "reason": "required"
        }
      ],
      "id": "string",
      "idempotency_key": "string",
      "limit": 0,
      "param": "string",
      "reason": "string",
      "required_scope": "string",
      "resource": "string",
      "retry_after": 0,
      "window": "string"
    },
    "message": "User not found",
    "request_id": "req_abc123",
    "status": 404,
    "type": "https://docs.notiflows.com/errors/not_found"
  }
}
{
  "error": {
    "code": "not_found",
    "details": {
      "allowed_statuses": [
        "string"
      ],
      "allowed_transitions": [
        "string"
      ],
      "auth": "api_key",
      "current_status": "string",
      "fields": [
        {
          "field": "email",
          "message": "can't be blank",
          "reason": "required"
        }
      ],
      "id": "string",
      "idempotency_key": "string",
      "limit": 0,
      "param": "string",
      "reason": "string",
      "required_scope": "string",
      "resource": "string",
      "retry_after": 0,
      "window": "string"
    },
    "message": "User not found",
    "request_id": "req_abc123",
    "status": 404,
    "type": "https://docs.notiflows.com/errors/not_found"
  }
}
{
  "error": {
    "code": "not_found",
    "details": {
      "allowed_statuses": [
        "string"
      ],
      "allowed_transitions": [
        "string"
      ],
      "auth": "api_key",
      "current_status": "string",
      "fields": [
        {
          "field": "email",
          "message": "can't be blank",
          "reason": "required"
        }
      ],
      "id": "string",
      "idempotency_key": "string",
      "limit": 0,
      "param": "string",
      "reason": "string",
      "required_scope": "string",
      "resource": "string",
      "retry_after": 0,
      "window": "string"
    },
    "message": "User not found",
    "request_id": "req_abc123",
    "status": 404,
    "type": "https://docs.notiflows.com/errors/not_found"
  }
}
{
  "error": {
    "code": "not_found",
    "details": {
      "allowed_statuses": [
        "string"
      ],
      "allowed_transitions": [
        "string"
      ],
      "auth": "api_key",
      "current_status": "string",
      "fields": [
        {
          "field": "email",
          "message": "can't be blank",
          "reason": "required"
        }
      ],
      "id": "string",
      "idempotency_key": "string",
      "limit": 0,
      "param": "string",
      "reason": "string",
      "required_scope": "string",
      "resource": "string",
      "retry_after": 0,
      "window": "string"
    },
    "message": "User not found",
    "request_id": "req_abc123",
    "status": 404,
    "type": "https://docs.notiflows.com/errors/not_found"
  }
}
{
  "error": {
    "code": "not_found",
    "details": {
      "allowed_statuses": [
        "string"
      ],
      "allowed_transitions": [
        "string"
      ],
      "auth": "api_key",
      "current_status": "string",
      "fields": [
        {
          "field": "email",
          "message": "can't be blank",
          "reason": "required"
        }
      ],
      "id": "string",
      "idempotency_key": "string",
      "limit": 0,
      "param": "string",
      "reason": "string",
      "required_scope": "string",
      "resource": "string",
      "retry_after": 0,
      "window": "string"
    },
    "message": "User not found",
    "request_id": "req_abc123",
    "status": 404,
    "type": "https://docs.notiflows.com/errors/not_found"
  }
}