---
title: "Update Action"
method: PATCH
path: "/notifications/actions/{id}"
tags: ["notifications"]
---

# Update Action

`PATCH /notifications/actions/{id}`

Update an existing action by UUID

## Path parameters

- `id` string, uuid, required

## Query parameters

- `mock` boolean

## Request body

- Action — Request body for creating an action
  - `data` object — The data object
    - `type` string — Type of resource
    - `attributes` object — Attributes of resource
      - `organizationId` string, uuid, required — UUID of the organization to which this action belongs.
      - `type` 'email' | 'webhook', required — The type of action
      - `target` string[], required — Array of target(s) for this action. To add a custom target, you must add customTarget as the value for this field and add your custom target to the customTarget field
      - `eventType` string[] — Array of eventType(s) for this action. The action will be triggered when any one of the selected eventTypes occurs.
      - `resourceFilter` string[] — Array of resourceUri(s) for which the action will be triggered. An empty array indicates that the action will trigger for any resource. Including multiple resourceUris indicated that the action will trigger for each resource. Currently, this only supports resourceUris which only include an organization and service.
      - `customTarget` string[] — Array of custom target(s). You must select customTarget as your "target" value and add that value here to be valid
      - `templateId` string, uuid — The UUID of the template you wish to associate with this action. Required for action type 'email'
      - `enabled` boolean — Whether this action is enabled

## Response `201`

Return a single data response

- object
  - `data` ActionDataResponse, required — Expected data response object for an action
    - `type` string — Type of resource
    - `id` string, uuid — UUID of resource; additional resource attributes will also be returned
    - `attributes` object — Attributes of resource
      - `type` 'email' | 'webhook' — Type of action
      - `target` string[] — Array of target(s) for this action. To add a custom target, you must add customTarget as the value for this field and add your custom target to the customTarget field
      - `eventType` string[] — Array of eventType(s) for this action
      - `resourceFilter` string[] — Array of resourceUri(s) for which the action will be triggered. An empty array indicates that the action will trigger for any resource. Including multiple resourceUris indicated that the action will trigger for each resource. Currently, this only supports resourceUris which only include an organization and service.
      - `customTarget` string[] — Array of custom target(s). You must select customTarget as your "target" value and add that value here to be valid
      - `enabled` boolean — Whether this action is enabled
      - `createdAt` string, date-time — Date the resource was logged
      - `updatedAt` string, date-time — Date the resource was last modified
      - `createdBy` string, uuid — User who created the action resource
      - `updatedBy` union — User who updated the action resource
        - string, uuid
        - unknown
    - `relationships` ActionRelationships — Relationships of an action
      - `organization` OrganizationRelationship, required — Organization that the resource belongs to
        - `data` object
          - `type` string — Type of the organization
          - `id` string, uuid — UUID of the organization
      - `template` object, required
        - `data` TemplateRelationship — Template that is associated with the action
          - `type` string — Type of resource
          - `id` string, uuid — UUID of the resource
    - `links` Link — Link object for resource meta data
      - `self` string
  - `links` Link — Link object for resource meta data
    - `self` string

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `500` — Internal Server Error

---

[API](https://skmtc.net/brickworksoftware/apis/brickwork-software-api.md) · [All operations](https://skmtc.net/brickworksoftware/apis/brickwork-software-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/brickworksoftware/brickwork-software-api/versions/b06aa4f3b83c/schema)
