The best way to send events on Sailhouse is via our language-native SDKs. These wrap around our core HTTP APIs, and include some useful functionality such as streaming and batching.
let mut data = HashMap::new();data.insert("message", "Hello world!");let publish_future = client.publish("example-topic", data);
As mentioned above, an event must be sent to a topic. This directs your event to downstream subscribers, and acts as a “bucket” that your different types of events can live in. To read more fun things about topics, head over to their concepts section.Once an event is in a topic, it is sent to all the subscriptions of a topic. Say you have a user-created event, which you send when someone signs up to your application. You may have some subscriptions like send-welcome-email and check-spam-score. These subscriptions will both get a copy of the event, where it will sit until acknowledged in future.
You can schedule an event to be sent at a future time for a topic. This can be any time in the future, and the event will not be sent to subscribers until that date.
The scheduled event will be sent to all subscribers present when it is scheduled for. If you add a subscriber inbetween after it has been sent, but before the scheduled time, it will be sent to that subscription.
TypeScript
Go
client.publish('reminder-queue', { user_id: '123'}, { date: new Date() // some future date})
err := client.Publish( ctx, "reminder-queue", data, // 5 days in the future sailhouse.WithScheduledTime(time.Now().Add(time.Hour * 24 * 5)),)
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Sailhouse","colors":{"primary":"#ff8e3c","light":"#ff8e3c","dark":"#ff8e3c"},"logo":{"light":"https://mintcdn.com/sailhouse/YV_RX8UqlSyMKR-i/logo/light.svg?fit=max\u0026auto=format\u0026n=YV_RX8UqlSyMKR-i\u0026q=85\u0026s=728ed364a11a203156cb574800daf309","dark":"https://mintcdn.com/sailhouse/YV_RX8UqlSyMKR-i/logo/dark.svg?fit=max\u0026auto=format\u0026n=YV_RX8UqlSyMKR-i\u0026q=85\u0026s=68f8e39947f8b14654923d815840097e"},"favicon":"/favicon.png","api":{"openapi":["api-reference/openapi.json"]},"navbar":{"links":[{"label":"Support","href":"mailto:support@sailhouse.dev"}],"primary":{"type":"button","label":"Dashboard","href":"https://app.sailhouse.dev"}},"footer":{"socials":{"twitter":"https://twitter.com/sailhousedev","github":"https://github.com/sailhouse","linkedin":"https://www.linkedin.com/company/sailhousedev"}},"integrations":{"plausible":{"domain":"docs.sailhouse.dev"}},"contextual":{"options":["copy","view"]},"navigation":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://sailhouse.dev/blog"},{"anchor":"Changelog","icon":"calendar","href":"https://sailhouse.dev/changelog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"sailhouse","hasAudioNarration":false,"actualSubdomain":"sailhouse","customDomains":["docs.sailhouse.dev"],"gitSource":{"type":"github","owner":"sailhouse","repo":"docs-new","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6a21e61b4c43fec466d793e0","collectionId":"445c3c44-5a44-4cba-a367-954610034572","schemaVersion":"v2"},"entitlements":{},"buildId":"6a21e61b4c43fec466d793e0:success","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"Documentation","count":22},{"language":"default","tag":"Guides","count":7},{"language":"default","tag":"Concepts","count":5},{"language":"default","tag":"SDKs","count":5},{"language":"default","tag":"API Reference","count":4},{"language":"default","tag":"Processing","count":2},{"language":"default","tag":"Get Started","count":2},{"language":"default","tag":"Reference","count":2},{"language":"default","tag":"Sending events","count":1},{"language":"default","tag":"API Documentation","count":1}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"guides/sending-events","slug":"/guides/sending-events","pageMetadata":{"title":"Sending events","description":null,"href":"/guides/sending-events"},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tab,Tabs,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The best way to send events on Sailhouse is via our language-native SDKs. These wrap around our core HTTP APIs, and include some useful functionality such as streaming and batching.`}),`\n`,_jsx(Heading,{level:`3`,id:`publishing-events`,children:`Publishing events`}),`\n`,_jsx(_components.p,{children:`Sending, or publishing, and event is the first step in communicating with your application.`}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`TypeScript / JavaScript`,id:`typescript-%2F-javascript`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`publish`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"some-topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` some:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"property\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})})}),_jsx(Tab,{title:`Go`,id:`go`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`3`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Publish`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"some-topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`map`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#4EC9B0`},children:`string`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"some\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"property\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})})}),_jsx(Tab,{title:`Rust`,id:`rust`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`rust`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`rust`,children:_jsxs(_components.code,{language:`rust`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` mut`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` HashMap`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`::`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`new`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`insert`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Hello world!\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`let`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` publish_future`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`publish`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"example-topic\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})})]}),`\n`,_jsxs(_components.p,{children:[`As mentioned above, an event must be sent to a topic. This directs your event to downstream subscribers, and acts as a “bucket” that your different types of events can live in. To read more fun things about topics, head over to `,_jsx(_components.a,{href:`/concepts/topics`,children:`their concepts section`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Once an event is in a topic, it is sent to all the subscriptions of a topic. Say you have a `,_jsx(_components.code,{children:`user-created`}),` event, which you send when someone signs up to your application. You may have some subscriptions like `,_jsx(_components.code,{children:`send-welcome-email`}),` and `,_jsx(_components.code,{children:`check-spam-score`}),`. These subscriptions will both get a copy of the event, where it will sit until acknowledged in future.`]}),`\n`,_jsx(Heading,{level:`4`,id:`scheduling-events`,children:`Scheduling events`}),`\n`,_jsxs(_components.p,{children:[`You can schedule an event to be sent at a future time for a topic. This can be `,_jsx(_components.em,{children:`any`}),` time in the future, and the event will not be sent to subscribers until that date.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`The scheduled event will be sent to all subscribers present when it is scheduled for. If you add a subscriber inbetween after it has been sent, but before the scheduled time, it will be sent to that subscription.`})}),`\n`,_jsxs(Tabs,{children:[_jsx(Tab,{title:`TypeScript`,id:`typescript`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`publish`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'reminder-queue'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` user_id:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '123'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}, {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` date:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Date`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`() `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// some future date`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`})`})}),`\n`]})})})}),_jsx(Tab,{title:`Go`,id:`go-2`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`go`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`go`,children:_jsxs(_components.code,{language:`go`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`err`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` :=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Publish`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` ctx`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"reminder-queue\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // 5 days in the future`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sailhouse`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`WithScheduledTime`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`time`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Now`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`().`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`Add`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`time`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Hour`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 24`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` *`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 5`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})})})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Sending events","description":null,"href":"/guides/sending-events"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Publishing events","slug":"publishing-events","depth":3,"children":[]},{"title":"Scheduling events","slug":"scheduling-events","depth":4,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"sailhouse","siteName":"Sailhouse","title":"Sending events - Sailhouse","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-01-07T00:51:48.349Z","originalFileLocation":"guides/sending-events.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"application-name\" content=\"Sailhouse\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/sailhouse/LM-ZcuAYI-HuJw2M/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/sailhouse/LM-ZcuAYI-HuJw2M/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/sailhouse/LM-ZcuAYI-HuJw2M/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/sailhouse/LM-ZcuAYI-HuJw2M/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/sailhouse/LM-ZcuAYI-HuJw2M/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/sailhouse/LM-ZcuAYI-HuJw2M/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/sailhouse/LM-ZcuAYI-HuJw2M/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/sailhouse/LM-ZcuAYI-HuJw2M/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/sailhouse/LM-ZcuAYI-HuJw2M/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Sending events - Sailhouse\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Sailhouse\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.sailhouse.dev/guides/sending-events\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://sailhouse.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Sending+events\u0026amp;theme=3c0015df2b2c00cbd9c01ff0\u0026amp;signature=68a1f2600baee614824e0156b2f6fcb78c570096418df00ed559e6c216c863b3\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Sending events - Sailhouse\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://sailhouse.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Sending+events\u0026amp;theme=3c0015df2b2c00cbd9c01ff0\u0026amp;signature=68a1f2600baee614824e0156b2f6fcb78c570096418df00ed559e6c216c863b3\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/sailhouse/LM-ZcuAYI-HuJw2M/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Sailhouse\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ff8e3c\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.sailhouse.dev/guides/sending-events\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/sending-events.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.sailhouse.dev/#organization\",\"name\":\"Sailhouse\",\"url\":\"https://docs.sailhouse.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/sailhouse/YV_RX8UqlSyMKR-i/logo/light.svg?fit=max\u0026auto=format\u0026n=YV_RX8UqlSyMKR-i\u0026q=85\u0026s=728ed364a11a203156cb574800daf309\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.sailhouse.dev#website\",\"name\":\"Sailhouse\",\"url\":\"https://docs.sailhouse.dev\",\"publisher\":{\"@id\":\"https://docs.sailhouse.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.sailhouse.dev/guides/sending-events#webpage\",\"url\":\"https://docs.sailhouse.dev/guides/sending-events\",\"name\":\"Sending events\",\"dateModified\":\"2026-01-07T00:51:48.349Z\",\"isPartOf\":{\"@id\":\"https://docs.sailhouse.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.sailhouse.dev/guides/sending-events#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.sailhouse.dev/guides/sending-events#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Sailhouse\",\"item\":\"https://docs.sailhouse.dev\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Sending events\",\"item\":\"https://docs.sailhouse.dev/guides/sending-events\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.sailhouse.dev/guides/sending-events#article\",\"headline\":\"Sending events\",\"name\":\"Sending events\",\"url\":\"https://docs.sailhouse.dev/guides/sending-events\",\"mainEntityOfPage\":{\"@id\":\"https://docs.sailhouse.dev/guides/sending-events#webpage\"},\"dateModified\":\"2026-01-07T00:51:48.349Z\",\"publisher\":{\"@id\":\"https://docs.sailhouse.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.sailhouse.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Sailhouse\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Sailhouse","nav":{"global":{"anchors":[{"anchor":"Blog","icon":"newspaper","href":"https://sailhouse.dev/blog"},{"anchor":"Changelog","icon":"calendar","href":"https://sailhouse.dev/changelog"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Get Started","pages":[{"title":"Introduction","href":"/introduction"},{"title":"Quickstart","description":"Start sending events in minutes","href":"/quickstart"}]},{"group":"Guides","pages":[{"title":"Sending events","href":"/guides/sending-events"},{"title":"Receiving push events","description":"Get up to speed on handling events from push subscriptions","href":"/guides/receiving-push-events"},{"title":"Pulling events","href":"/guides/pulling-events"},{"title":"Workflows","href":"/guides/workflows"},{"title":"Cron jobs","href":"/guides/cron-jobs"},{"title":"Scheduling events","href":"/guides/scheduling-events"},{"title":"Advanced Filtering","href":"/guides/advanced-filtering"}]},{"group":"Concepts","pages":[{"title":"Topics","href":"/concepts/topics"},{"title":"Subscriptions","href":"/concepts/subscriptions"},{"title":"Events","href":"/concepts/events"},{"title":"Self Healing","href":"/concepts/self-healing"},{"title":"Wait groups","href":"/concepts/wait-groups"}]},{"group":"SDKs","pages":[{"title":"Introduction","href":"/sdks/introduction"},{"title":"TypeScript / JavaScript","icon":"js","href":"/sdks/typescript"},{"title":"Go","icon":"golang","href":"/sdks/go"},{"title":"Python (Beta)","icon":"python","href":"/sdks/python"},{"title":"Rust (Beta)","icon":"rust","href":"/sdks/rust"}]},{"group":"Observability","pages":[{"title":"Tracing events","href":"/observability/tracing"}]},{"group":"Reference","pages":[{"title":"Frequently Asked Questions","sidebarTitle":"Frequently Asked Questions","href":"/reference/faq"},{"title":"Tokens","href":"/reference/tokens"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]},{"tab":"CLI","pages":[{"title":"CLI","href":"/cli-reference/introduction"}]}]},"title":"Sending events - Sailhouse","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":[],"chunks":[]}