---
id: inbox-rule-validate
title: Validate an inbox rule
description: >-
  Runs every check that creating (`mode: new`) or updating (`mode: edit`) an
  inbox rule runs, limits included, and saves nothing.
sidebar_label: Validate an inbox rule
hide_title: true
hide_table_of_contents: true
api: >-
  eJztWm1v5LYR/isDosDlLrLsCxIEFZACbs5pHNwbbF8ugH21uNKsxVgiFZLyemPst37v32n/Tv9A/0IxQ2pX2l2/5dDiCuSL4d2VyOG8PPPMDG+ElxdOZKfiUE/MNdiuRic+JKJEV1jVemW0yMRRpx3gFdo5FBUWl+Ar6aGwKL3SF/BZ3pgSM9A4y5+CsdC15fgXLJXPn4LUoJb7gO20S6BWjfIOlC7qrsQyAalLcPIKHWjjK6Uv0jN9pt/pWl0i5KWdn9tOf+NthzkYHaRAfou3xSRscyVrVUKJU6UVHQOU0088/YbWGpuBog9uhtZB/sXeXg4z5SvI+b0MprJ2mPOy4eCtNZMaG5iaTpfpmRaJMC1aSWsfliITfLIdOlnGa0iPIhEWf+nQ+T+bci6yG/6oLJYiowMkojDao/b0k2zbWhW83u7PjvR+I1xRYSPpPz9vUWTCTH7Gwsd1w0KnYnVIMl1rSS6v0NF7g99oFeVrWoatfdTV+GL1c7Kxx9gJTiocqtNMx+ZMgR5opNIwVViXDqRFqJXzWEKFFlP4ztioTH4iiUYnRymMLnldl0CJtZy74AgT6QvygQQsyhJ8hRB0AlNrGsj/cnACu4Vpmk5H3bldlumcZNoNz+bBXEOVqVIkwpnOFmSkQnq8MHZO35GAytO/sisV6gJJqbIM4sn67UC9wYZjhatyYC7nrdIXIhGt9B4tqfGvp3Ln1/MPn5+dpfG/P2yo+qWZoS2kQ5gZW7rgmXgtC1/PwWiE0vgUDj3I2hlQJWqvpgod64djS/WmcegpEqM6lYdCUhgUldQXCLX0aDm+/gT/+ts///2Pv8OzZ6+Nx+zZM1o/POy8tD6GR1tLPzW2SfMU3jkynYRJp2q/ozRv/cTB4QsOeBdgguWZGgtz01kw9kJq9SubKpgFr2XTslfKosHUYdGRAc6nSp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2E2FcdKy6nSfTOQ1QjkVscYTiriFblHNPv7Xv+tHfdRv31BYTJsdt/ZLO5bxbHzu+y+3j51IXjmNiFaF079PN1L95YcIhPfjmJ/w+SvpJZh6j1oycbBVokFtb4Z8C3dZUEXrrS0aB1PL8Ira5eIknDlZTjocGECF3rus+FNwjjRaLtJrVy1vAlAV5cc/zJeplQW6WIcJzZCuUYyElC5Rg4c4Wx8W3H90DcrF/j9tuv2264RZsi5d9taKk365qzQN2hPRbHuWau8IhKxzCwfElFROspOxc3NRDp8Z+vFgr4ONWp2SiEirQpQckphUKEsKc5Pb8QlztmL2WA7J4Egx8Jys7NOF8XCG2GkduezHwYZ8+2b4xOxmuPFOLSS4pD+ZoLvAIej0t1e+u5G1FJfdExlRFiTh7Dj7LeW7YbX26SeDyS8uQlPnJhL1Aw14SiePosFDZP+A04lGUw=
sidebar_class_name: post api-method
info_path: docs/api/communications
custom_edit_url: null
canonical: 'https://docs.nullplatform.com/docs/api/inbox-rule-validate'
---
<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Validate an inbox rule"}
>
</Heading>

<MethodEndpoint
  method={"post"}
  path={"/communications/inbox_rule/validate"}
  context={"endpoint"}
>

</MethodEndpoint>

Runs every check that creating (`mode: new`) or updating (`mode: edit`) an inbox rule runs, limits included, and saves nothing.

Unlike `dry_run=true` on create and update, an invalid definition isn't an error: it answers `200` with `valid: false` and every problem found.

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={undefined}
>

</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["definition"],"properties":{"definition":{"title":"InboxRuleDefinition","type":"object","description":"The definition of an inbox rule. The main fields are listed here. For every field, including conditions, delays, and batching, read the schema from `GET /communications/inbox_rule/schema`.\n","required":["id","source","category","severity","audience"],"additionalProperties":true,"properties":{"id":{"type":"string","pattern":"^[a-z_]+\\.[a-z_]+$","description":"Lowercase words with exactly one dot. It also identifies the rule in inbox settings, and it can't change later.\n\n> ℹ️ **Note:** It can't start with `platform.`. Using a built-in rule's ID edits that rule for your organization.\n","example":"acme.security_finding"},"status":{"type":"string","enum":["active","deprecated"],"description":"Whether the rule is active. Defaults to `active`. `deprecated` means deactivated.","example":"active"},"source":{"description":"What makes the rule fire:\n\n- `{ \"kind\": \"invoked\" }`: your code calls the emission endpoint.\n- A source name, like `\"deployment\"`: the entity changes status in nullplatform. See `GET /communications/inbox_rule/source`.\n- `{ \"kind\": \"stale\", ... }`: an entity stays in a status for too long.\n","oneOf":[{"type":"string"},{"type":"object","additionalProperties":true}],"example":{"kind":"invoked"}},"context_schema":{"type":"object","additionalProperties":true,"description":"A JSON Schema for the data each send carries. An invoked rule must require `id`, because sends are idempotent by it.","example":{"type":"object","required":["id","service","owner_id"],"properties":{"id":{"type":"string"},"service":{"type":"string"},"summary":{"type":"string"},"owner_id":{"type":"integer"}}}},"category":{"type":"object","description":"How the rule shows up in inbox settings. All six fields are required.","required":["group","label","description","configurable","allows_all","default_mode"],"properties":{"group":{"type":"string","description":"The group the rule is listed under in inbox settings.","example":"security"},"label":{"type":"string","description":"The rule's name in inbox settings.","example":"Security findings"},"description":{"type":"string","maxLength":70,"description":"One line on what the rule announces.","example":"Vulnerabilities your CI scanners report."},"configurable":{"type":"boolean","description":"Whether people can change their mode for this rule.","example":true},"allows_all":{"type":"boolean","description":"Whether people can choose **Everything** for this rule under a resource. Requires `configurable`.","example":true},"default_mode":{"type":"string","enum":["off","involved","all"],"description":"What people get until they change it.","example":"involved"}}},"severity":{"type":"string","enum":["informational","maintenance","degraded","outage"],"description":"Sets the icon and the color of the notification.","example":"degraded"},"audience":{"type":"array","description":"One entry per reading. Each entry is a separate notification with its own wording.","items":{"type":"object","required":["as","action","content"],"additionalProperties":true,"properties":{"as":{"type":"string","description":"The name of this reading.","example":"owner"},"who":{"type":"object","additionalProperties":true,"description":"Who receives this reading: `{ \"user\": \"${{ context.owner_id }}\" }` for a user from the context, or `{ \"can\": \"approval_request:approve\" }` for everyone who holds that action on the resource. Without `who`, only the people who chose **Everything** receive it.","example":{"user":"${{ context.owner_id }}"}},"action":{"type":"string","description":"The rule's ID, or an ID that starts with it.","example":"acme.security_finding"},"content":{"type":"object","required":["title"],"properties":{"title":{"type":"string","description":"The notification's title. Accepts templates like `${{ context.service }}` and inline Markdown.","example":"Security finding on ${{ context.service }}"},"body":{"type":"string","description":"The notification's body. Accepts templates, inline Markdown, links, and lists.","example":"${{ context.summary }}"}}},"fallback":{"type":"object","additionalProperties":true,"description":"Another reading, with the same fields, for when `who` resolves nobody."}}}},"visible_to":{"type":"array","maxItems":1,"items":{"type":"string"},"description":"The one NRN the rule applies under. Defaults to your organization. Sends for resources outside it are refused.","example":["organization=1:account=2"]}}},"mode":{"type":"string","enum":["new","edit"],"default":"new","description":"`new` checks the definition as a create, and `edit` as an update of the rule in `type_id`.","example":"new"},"type_id":{"type":"string","maxLength":120,"description":"With `mode: edit`, the ID of the inbox rule you're updating. It must match `definition.id`.","example":"acme.security_finding"}}}}}}}
>

</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"The verdict, for a valid or an invalid definition alike.","content":{"application/json":{"schema":{"type":"object","properties":{"valid":{"type":"boolean","description":"Whether the definition would be accepted.","example":false},"problems":{"type":"array","description":"One entry per problem. Empty when the definition is valid.","items":{"type":"object","properties":{"path":{"type":"string","description":"A JSON pointer to the invalid field in the definition.","example":"/category/default_mode"},"message":{"type":"string","description":"What's wrong with that field.","example":"must be equal to one of the allowed values"}}}}}}}}},"4XX":{"description":"The request couldn't be processed. For example, a parameter is invalid, the resource doesn't exist, or you don't have permission. The body is a problem details object (RFC 9457).","content":{"application/problem+json":{"schema":{"type":"object","description":"Describes what went wrong, following the RFC 9457 problem details format.","required":["type","title","status"],"properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem. It's an identifier, not a link, and it's the same every time this problem occurs.","example":"urn:nullplatform:error:routes-helper:invalid-params"},"title":{"type":"string","description":"A short, human-readable summary of the problem.","example":"There are invalid parameters on the request"},"status":{"type":"integer","description":"The HTTP status code of the response.","example":400},"code":{"type":"string","description":"A stable, machine-readable error code. Use it to handle specific errors in your integrations.","example":"ROUTES_HELPER.INVALID_PARAMS"},"detail":{"type":"string","nullable":true,"description":"More information about what went wrong in this request, when available.","example":null},"errors":{"type":"array","description":"One entry per invalid field or parameter. Only present on validation errors.","items":{"type":"object","properties":{"field":{"type":"string","description":"The name of the invalid field or parameter.","example":"application_id"},"in":{"type":"string","description":"Where the field was sent: `body`, `query`, or `params` (path parameters).","example":"query"},"issue":{"type":"string","description":"What's wrong with the field, such as `required` or `invalid`.","example":"invalid"},"value":{"description":"The value that was sent, when relevant.","example":"not-a-number"},"message":{"type":"string","description":"A human-readable explanation of the issue."}}}},"message":{"type":"string","deprecated":true,"description":"Same value as `title`, kept for backward compatibility. Use `title` or `code` instead.","example":"There are invalid parameters on the request"},"traceId":{"type":"string","description":"An identifier for this request, when available. Include it when you contact nullplatform support."}}}}}},"5XX":{"description":"Something went wrong on nullplatform's side. The body is a problem details object (RFC 9457).","content":{"application/problem+json":{"schema":{"type":"object","description":"Describes what went wrong, following the RFC 9457 problem details format.","required":["type","title","status"],"properties":{"type":{"type":"string","description":"A URI that identifies the kind of problem. It's an identifier, not a link, and it's the same every time this problem occurs.","example":"about:blank"},"title":{"type":"string","description":"A short, human-readable summary of the problem.","example":"Oops.. there was an internal error"},"status":{"type":"integer","description":"The HTTP status code of the response.","example":500},"code":{"type":"string","description":"A stable, machine-readable error code. Use it to handle specific errors in your integrations."},"detail":{"type":"string","nullable":true,"description":"More information about what went wrong in this request, when available.","example":null},"message":{"type":"string","deprecated":true,"description":"Same value as `title`, kept for backward compatibility. Use `title` or `code` instead.","example":"Oops.. there was an internal error"},"traceId":{"type":"string","description":"An identifier for this request, when available. Include it when you contact nullplatform support."}}}}}}}}
>

</StatusCodes>

