Skip to content

notifications_update

PUT
/api/notifications/{id}
curl --request PUT \
--url https://example.com/api/notifications/1 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'X-Workspace: 2489E9AD-2EE2-8E00-8EC9-32D5F69181C0' \
--data '{ "verb": "example", "workspace": "example", "unread": true, "archived": true }'

Update a notification.

id
required
integer

A unique integer value identifying this Notification.

X-Workspace
required
string format: uuid

Workspace ID

Serializer for Notification model.

object
id
required
integer
actor_object
required

Return a dictionary containing information about the actor object.

Parameters

obj : object The object that contains an actor attribute with relevant information.

Returns

dict A dictionary containing the actor’s full name, email, class name, and ID.

object
key
additional properties
verb
string
action_object
required

Return a dictionary containing information about the action object.

Parameters

obj : object The object that contains information about an action object.

Returns

dict A dictionary with keys “obj” and “id”, representing the content type of the action object and its ID, respectively. Includes “extra_info” if applicable.

object
key
additional properties
target_object
required

Return a dictionary containing information about a target object.

Parameters

obj : object The object that has a target attribute with relevant information.

Returns

dict A dictionary containing the target object’s content type name, type ID, and title. Includes “extra_info” if applicable.

object
key
additional properties
workspace
string
level
required
string
Allowed values: success info warning error
timestamp
required
string format: date-time
description
required
string
nullable
download_url
required

Return the download URL stored in extra data, if any.

string
nullable
count
required

Return the number of objects a grouped notification stands for, if any.

integer
nullable
unread
boolean
archived
boolean

No response body

Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
message
string

Example

{
"code": "body_validation_error",
"message": "The request body does not match the schema for the expected parameters. Check the `details` property for more details.",
"details": [
{
"parameter": "archived",
"message": "archived_value is not a valid boolean.",
"code": "invalid"
}
]
}
Media typeapplication/json
object
code
required
string
>= 1 characters
message
required
string
>= 1 characters
details
required
Array<object>
object
parameter
string
nullable
code
string
nullable
message
string

Example

{
"code": "object_not_found",
"message": "Object not found. Check the `details` property for more details.",
"details": [
{
"parameter": "<id>",
"code": "does_not_exist",
"message": "\"<id>\" does not exist."
}
]
}