# CreateNotifications

Create new notifications.

`POST /api/v2/notifications`

**API:** AvaTax API
**Tag:** Registrar
**API Version:** v2
**Base URL:** https://sandbox-rest.avatax.com/
**Content-Type:** `application/json`
**Accepts:** `application/json`
**Authentication:** API Key (`Authorization` in header) or OAuth 2.0 or Basic (username + license key)

Source: https://developer.avalara.com/products/crossborder/api/methods/Registrar/CreateNotifications/

## Description

This API is available by invitation only.
            
Create a single notification.
            
A notification is a message from Avalara that may have relevance to your business.  You may want
to regularly review notifications and then dismiss them when you are certain that you have addressed
any relevant concerns raised by this notification.
            
A Global notification is a message which is directed to all the accounts and is set to expire within
a certain time and cannot be dismissed by the user. Make accountId and companyId null to create a global notification.
            
An example of a notification would be a message about new software, or a change to AvaTax that may
affect you, or a potential issue with your company's tax profile.

### Security Policies

* This API requires one of the following user roles: BatchServiceAdmin, FirmAdmin, Registrar, SiteAdmin, SSTAdmin, SystemAdmin, TechnicalSupportAdmin, TechnicalSupportUser.
* This API is available by invitation only.  To request access to this feature, please speak to a business development manager and request access to [NotificationsAPI:Create].

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `X-Avalara-Client` | string | header | No | Identifies the software you are using to call this API.  For more information on the client header, see [Client Headers](https://developer.avalara.com/avatax/client-headers/) . |

## Request Body

**Schema:** `NotificationModel[]`

Represents a single notification.
            
A notification is a message from Avalara that may have relevance to your business.  You may want
to regularly review notifications and then dismiss them when you are certain that you have addressed
any relevant concerns raised by this notification.
            
An example of a notification would be a message about new software, or a change to AvaTax that may
affect you, or a potential issue with your company's tax profile.

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | No | The unique id of the notification. Example: `123`. |
| `accountId` | integer | No | The unique ID number of the account that received this notification. Example: `202011901`. |
| `companyId` | integer | No | If this notification was tied to a specific company, this will be the
unique ID number of the company that received the notification.  Notifications that
are tied to accounts will have a `NULL` value for `companyId`. Example: `34345`. |
| `referenceObject` | string | No | The type name of object referred to by this notification, if any.
            
Some notifications may include information about a related data object.
            
For example, if this notification was related to a nexus declaration, the `referenceObject` field would
be  `Nexus` and the `referenceId` field would be the unique ID number of that nexus. Example: `Company Return`. |
| `referenceId` | integer | No | The unique reference Id number of the object referred to by this notification, if any.
            
Some notifications may include information about a related data object.
            
For example, if this notification was related to a nexus declaration, the `referenceObject` field would
be  `Nexus` and the `referenceId` field would be the unique ID number of that nexus. Example: `692`. |
| `severityLevelId` | string | **Yes** | The severity level of the notification. Values: `Neutral`, `Advisory`, `Blocking`, `Complete`. Example: `Neutral`. |
| `category` | string | No | The category of this notification.
            
Notification categories are a useful way to group related notifications together. Category names may change
over time.
            
For Example: "Backdated Transactions" or "Nexus Jurisdiction Alerts", or "Certificate Expiration". Example: `Certificate Expiration`. |
| `topic` | string | No | The topic of this notification.
            
Notification topics contain information about the notification.  They are a summary of the issue and can
help you decide what type of action to take.
            
For Example: "Backdated Transactions" or "Nexus Jurisdiction Alerts", or "Certificate Expiration". |
| `message` | string | **Yes** | The message for this notification.  This is a friendly description of the notification and any relevant
information that can help you decide what kind of action, if any, to take in response. Example: `The certificate of your company is nearing its expiration, please consider renewing it.`. |
| `needsAction` | boolean | No | If this notification object requires user action to resolve, this value will be set to true. Example: `true`. |
| `actionName` | string | No | If there is a specific action suggested by this notification, this is the name of the action.
            
An action is a suggested next step such as "Review Your Tax Profile."  If an action is suggested,
you should give the viewer a hyperlink to the location referred to by `actionLink` and give the
hyperlink the name `actionName`. Example: `Certificate Renewal`. |
| `actionLink` | string | No | If there is a specific action suggested by this notification, this is the URL of the action.
            
An action is a suggested next step such as "Review Your Tax Profile."  If an action is suggested,
you should give the viewer a hyperlink to the location referred to by `actionLink` and give the
hyperlink the name `actionName`. Example: `www.xyz.com`. |
| `actionDueDate` | string | No | If there is a specific action suggested by this notification, and if this action is requested
by a specific due date, this value will be the due date for the action.
            
An action is a suggested next step such as "Review Your Tax Profile."  If an action is suggested,
you should give the viewer a hyperlink to the location referred to by `actionLink` and give the
hyperlink the name `actionName`.
            
For actions that have deadlines, such as "Confirm your tax registration before filing", this value
will be set to the deadline date for the action.  Otherwise, this value will be null. |
| `dismissed` | boolean | No | When a user has finished reviewing a notification, they may opt to dismiss it by calling the
`DismissNotification` API.  This API marks the notification as dismissed, and dismissed notifications
will generally not appear in most user interfaces. Example: `false`. |
| `dismissedByUserId` | integer | No | If this notification has been dismissed, this indicates the unique ID number of the user that
dismissed the notification. |
| `dismissedDate` | string | No | If this notification has been dismissed, this indicates the timestamp (in UTC time) when the user
dismissed the notification. |
| `expireDate` | string | **Yes** | If this notification is time sensitive, this is the latest date when the notification should be
displayed to the user. Example: `2026-07-02T00:00:00+00:00`. |
| `createdUserId` | integer | No | The unique ID number of the user who created the notification. Example: `442323`. |
| `createdDate` | string | No | The UTC timestamp of the time when this notification was created. Example: `2018-05-05T00:00:00`. |
| `modifiedUserId` | integer | No | The unique ID number of the user who most recently modified this notification. Example: `442323`. |
| `modifiedDate` | string | No | The UTC timestamp of the time when this notification was last modified. Example: `2018-05-07T00:00:00`. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success |  |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |

## Example Request

```bash
curl -X POST "https://sandbox-rest.avatax.com/api/v2/notifications" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '[
  {
    "id": 123,
    "accountId": 202011901,
    "companyId": 34345,
    "referenceObject": "Company Return",
    "referenceId": 692,
    "severityLevelId": "Neutral",
    "category": "Certificate Expiration",
    "message": "The certificate of your company is nearing its expiration, please consider renewing it.",
    "needsAction": true,
    "actionName": "Certificate Renewal",
    "actionLink": "www.xyz.com",
    "dismissed": false,
    "expireDate": "2026-07-02T00:00:00+00:00",
    "createdUserId": 442323,
    "createdDate": "2018-05-05T00:00:00",
    "modifiedUserId": 442323,
    "modifiedDate": "2018-05-07T00:00:00"
  }
]'
```