---
id: inbox-rule-emit
title: Send a notification from an inbox rule
description: >-
  Sends a notification from one of your **invoked** inbox rules: the resource
  the event is about (`nrn`) and the data the rule's templates read (`context`).
sidebar_label: Send a notification from an inbox rule
hide_title: true
hide_table_of_contents: true
api: >-
  eJztWm1z2zYS/is7+JKXo2TZsduGM/ngS9ypO22csZ2mM6nHhMiViTMJsABohefRf7/ZBSWRkiLbSdrmZqIvtkQQ2F3s8+xisbfCyysn4vfiWI/NB7B1gU5cRCJDl1pVeWW0iMUZ6syBBG28mqhU0s8wsaYEoxHMBBpTW3j6VOkbc43Z06egltPF4HMEi87UNkX+gjeoPSgHcmxqD48TbXXyBKTO+HEmvQwv1QU+cuCxrArp0YFFmcHjJDXa4wefPBn+of/QrXQWQWVYVsbT5OMG5sOGKkuGQKOUvuJ5nSwREpUlMDG28wuJAfJKKg1SuylaB8neaJREUEp77QBlmgNqbxtQGhIslfeYJTBVPocEPyjnlb6Kwdsak4j1SS2y5Nr4XOmrpRzK8+ISMjWZoCWZ2/XnK++Pnies4CmmqlKovYNpbiCV+pEHh9g3LBmgwIkHMikvbWrtMWNRLf4HU5I1SFWhqQrk2XxtNWYLc4OZTFqrSL+cPDO0psUU1Q2C8sM/tIiEqdCyMxxnIha85wOaJCbLiEhU0soSPVpysVuhyJcq6XMRCS1LpHcyEQmLf9bKYiZiMlwkXJpjKUV8K3xT0SjnrdJXIhKl0r+gvvK5iHcjUcoPi297o9mq157nCMevyD1JuaVHRlCoa4REpiUOHaa1Vb65nCjelwSMhSTDqjBNidoPJ1IVmCVDEQn8IMuqIIE2vipmUavjnzXaZqlkZptLW+uephNZuK2qoq5LAiaZRESCx4uLNSXP0IM3kLDL0X/kF1Pau6mpiwzGCA61j+hRbqZQSt202x9cYZo3IBlY5JXhJcuOrs3YZE3E3k0+5VrPlboJvtwzCcs5uwg6ovP/NllDeq1uLoNSe3okq6po2WTnP47UuV03iBmT5/Zs915oS9Zs8U18VVnyRa/Q0av0eJP3LP3lYDTa5C6vT1/P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l63Lz/qn3Va97JY4I1cPfpo4wdyoOtyHE5AD8iUVmgJP1SF1MGD5htMNhqKEHO3zlxZpDwh2wyrM3KaoBlZi/kzieAaq1ASGsv0eiotXWWXlfRqrArlm8AU7Wg2LPFHQndtnm6qPocwvZUpHt/D5w+7saetX21BPhzrtKgzJrjF2YZivEw9dEMNuLqqjPXDRY5+sCmnOTMltme/Jf0Y3ZvqkQO6fPyWfvy/pR8cXOJxIfX135RWnJjKDYf03GKozmqOslbLIoSNvzabOPhqsomvMkn4uin2fs7z1TEr29XnhloQKuNCvxIdn8VOasqy1i3puR1uHbqkQtHOrcpmO9ge7NpmhXl7U20LEYvc+8rFOzuyUsPu8sPUlNwfM7/mPyPuDPzUvexfmIcmEm2HEFdueBAVgPifH+dF2Z/fnQtShjj5dNl7c7TssuB2mE9pL+l1l/zNvRr9Vg3uk6D8cMJ9G2Tz4C27w9FwtAgBsXjZ27o15/pVanmFKw1hLpB+hin16kyXJfS2469C64x+5NpXVD/MBrbndpBuvciFBsnQFzTV3eWYZcjlSslRtG0To87AjU2Wsvv2qkq3y1j9rU/zW5/mxj7NllHIyDtVIRXX6Ziu5iXD9yJdBc6S9UQkYr74WRDfRSRyosz4vbi9HUuHb20xm9HP4RxFdJgpRwS97HXc4rb/aA/jRutcY9Pr3GyPZoIp/EZaFfKAB+n5+LRNXZ/AF+9N3ajEvKSgm64Gc+XozEkNpTnKDC3rEh68DBIPzkN2PX9xrVBP/R3hjcM0xcpvHXvRCbdvTs7OKZC1LaIl533Cyiml93IahDRV8ETqIaXfbkUh9VXNeZAIc1LYk/2ouRIlQz/YJjPc3oYR5+Ya9Wy2sIqn74Lviv8HOdl62Q==
sidebar_class_name: post api-method
info_path: docs/api/communications
custom_edit_url: null
canonical: 'https://docs.nullplatform.com/docs/api/inbox-rule-emit'
---
<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Send a notification from an inbox rule"}
>
</Heading>

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

</MethodEndpoint>

Sends a notification from one of your **invoked** inbox rules: the resource the event is about (`nrn`) and the data the rule's templates read (`context`).

Sends are idempotent by `context.id`. Sending the same `id` for the same `nrn` again answers `200`, marks each entry in `emitted` with `existing: true`, and creates nothing. Sending it for a different `nrn` answers `409`.

Recipients who can't see the resource are left out and counted in `rejected`, and people who turned the rule off for that resource don't receive it.

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

<ParamsDetails
  parameters={[{"in":"path","name":"id","required":true,"schema":{"type":"string","minLength":1,"maxLength":120},"description":"The ID of the inbox rule, like `acme.security_finding` or `deployment.failed`.","example":"acme.security_finding"},{"in":"query","name":"dry_run","required":false,"schema":{"type":"string","enum":["true","false"]},"description":"Set to `true` to see what would be sent, to how many people, and why a reading would reach nobody, without sending anything.","example":"true"}]}
>

</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["nrn","context"],"properties":{"nrn":{"type":"string","maxLength":500,"description":"The NRN of the resource the event is about. It must be inside your organization, and inside the rule's `visible_to`.","example":"organization=1:account=2:namespace=3:application=4"},"context":{"type":"object","additionalProperties":true,"description":"The data the rule's templates read. It must match the rule's `context_schema`, which always requires `id`.","example":{"id":"finding-8812","service":"payments-api","summary":"CVE-2026-1234 in a transitive dependency","owner_id":50}},"deliver_to":{"type":"string","enum":["me"],"description":"Set to `me` to send the rule's first reading to yourself only, as a test.","example":"me"}}}}}}}
>

</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"200":{"description":"A retry of an earlier send, nobody was left to notify, or a dry run.\n\nWith `dry_run=true`, the body describes what would be sent: `would_emit`, `rejected`, and `unreached` when a reading would reach nobody.\n","content":{"application/json":{"schema":{"oneOf":[{"title":"EmissionResult","type":"object","properties":{"emitted":{"type":"array","description":"One entry per reading that reached someone.","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The ID of the notification.","example":"6f1c2b9e-3a41-4f0e-9d55-2b7c1e0a9f13"},"as":{"type":"string","description":"The reading that was sent.","example":"owner"},"recipients":{"type":"integer","description":"How many people received it. A count, never user IDs.","example":1},"existing":{"type":"boolean","description":"Present on a retry: the notification already existed, and nothing was created.","example":true}}}},"rejected":{"type":"integer","description":"How many recipients were left out because they can't see the resource.","example":0},"test":{"type":"boolean","description":"Present when you sent the test to yourself with `deliver_to: me`.","example":true}}},{"title":"EmissionDryRun","type":"object","properties":{"would_emit":{"type":"array","description":"One entry per reading that would be sent.","items":{"type":"object","properties":{"as":{"type":"string","description":"The reading.","example":"owner"},"recipients":{"type":"integer","description":"How many people would receive it.","example":1},"payload":{"type":"object","additionalProperties":true,"description":"The notification as it would be rendered."},"existing":{"type":"boolean","description":"Present when this `context.id` was already sent for the same resource.","example":true}}}},"rejected":{"type":"integer","description":"How many recipients would be left out because they can't see the resource.","example":0},"deferred":{"type":"string","enum":["delay","batch"],"description":"Present when the rule would defer delivery.","example":"batch"},"unreached":{"type":"array","description":"Present when a reading would reach nobody, with the reason.","items":{"type":"object","properties":{"as":{"type":"string","description":"The reading.","example":"owner"},"reason":{"type":"string","description":"Why it would reach nobody.","example":"nobody"}}}}}}]}}}},"201":{"description":"At least one notification was created.","content":{"application/json":{"schema":{"title":"EmissionResult","type":"object","properties":{"emitted":{"type":"array","description":"One entry per reading that reached someone.","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The ID of the notification.","example":"6f1c2b9e-3a41-4f0e-9d55-2b7c1e0a9f13"},"as":{"type":"string","description":"The reading that was sent.","example":"owner"},"recipients":{"type":"integer","description":"How many people received it. A count, never user IDs.","example":1},"existing":{"type":"boolean","description":"Present on a retry: the notification already existed, and nothing was created.","example":true}}}},"rejected":{"type":"integer","description":"How many recipients were left out because they can't see the resource.","example":0},"test":{"type":"boolean","description":"Present when you sent the test to yourself with `deliver_to: me`.","example":true}}}}}},"202":{"description":"The rule declares a delay or a batch, so delivery was deferred.","content":{"application/json":{"schema":{"type":"object","properties":{"deferred":{"type":"string","enum":["delay","batch"],"description":"Why delivery was deferred.","example":"batch"}}}}}},"400":{"description":"The definition, the context, or the NRN is invalid. Each entry in `errors` points to one problem.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A summary of every problem found.","example":"invalid notification type: /category/description must be at most 70 characters"},"errors":{"type":"array","description":"One entry per problem.","items":{"type":"object","properties":{"path":{"type":"string","description":"A JSON pointer to the invalid field in the request body.","example":"/category/description"},"message":{"type":"string","description":"What's wrong with that field.","example":"must be at most 70 characters"}}}}}}}}},"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>

