Download OpenAPI specification:Download
Create
Create a new endpoint and susbscribe it to a topic.
Authorizations:
Request Body schema: application/json
topicId | string The id of the topic this endpoint subscribes to. Either |
topicName | string The name of the topic this endpoint subscribes to. Either |
url required | string User controlled service url where we will send webhooks to. Must not be on local network. |
Responses
Request samples
- Payload
{- "topicId": "string",
- "topicName": "string",
- "url": "string"
}
Update
Update an existing endpoint's url. This will only apply to newly created messages. All messages published before this endpoint was updated will still use the old url.
path Parameters
endpointId required | string |
Request Body schema: application/json
url required | string The new url of the endpoint |
Responses
Request samples
- Payload
{- "url": "string"
}
Tasks
Returns the last 100 tasks in descending chronological order.
Use the cursor parameter to paginate.
path Parameters
messageId required | string MessageId is the Id of the message to list tasks for. |
query Parameters
cursor | integer <int64> Cursor is a unix timestamp with milliseconds precision. You can use it to paginate the results. |
Responses
Publish
Publish a new message to a topic or directly to a url.
path Parameters
Destination required | string Destination can either be a topic name or id that you configured in the Upstash console,
or a valid url where the message gets sent to.
Make sure the url is prefixed with a valid protocol ( |
header Parameters
Content-Type | string ContentType is the MIME type of the message. We highly recommend sending a For example |
Upstash-Deduplication-Id | string Example: "abcdef" Provide a unique id for deduplication. This id will be used to detect duplicate messages.
If a duplicate message is detected, the request will be accepted but not enqueued.
Deduplication ids must not contain We store deduplication ids for 90 days. Afterwards it is possible that the message with the same deduplication id is delivered again. When scheduling a message, the deduplication happens before the schedule is created. |
Upstash-Content-Based-Deduplication | boolean Example: true If true, the message content will get hashed and used as deduplication id. If a duplicate message is detected, the request will be accepted but not enqueued. The content based hash includes the following values: All headers prefixed with The entire raw request body The destination from the url path We store deduplication ids for 90 days. Afterwards it is possible that the message with the same deduplication id is delivered again. When scheduling a message, the deduplication happens before the schedule is created. Messages created by schedules are not deduplicated. |
Upstash-Not-Before | integer <int64> Example: 1657093973 Delay the first delivery attempt until this time Unix timestamp with second precision. This overrides |
Upstash-Delay | string Example: "50s" | "3m" | "10h" | "1d" Delay the first delivery attempt. Format for this header is a number followed by duration abbreviation, like Overridden by |
Upstash-Retries | integer <int64> Example: 3 How often should this messasge be retried in case the destination API is not available. The total number of deliveries is therefore capped at Leave this empty to use the default value, (free tier: 3, paid tier: 5) The backoff duration in seconds is calculated as follows:
|
Upstash-Cron | string Example: */5 * * * * Cron allows you to send this message periodically on a schedule. Add a Cron expression and we will requeue this message automatically whenever the Cron expression triggers. We offer an easy to use UI for creating Cron expressions in our console or you can check out Crontab.guru. Note: it can take up to 60 seconds until the schedule is registered on an available qstash node. |
Upstash-Callback | string Example: https://example.com/callback You can define a callback url that will be called with the response from the destination API. Callbacks are experimental, and the API might change in the future! The callback url must be prefixed with a valid protocol ( |
Upstash-Forward-* | string Example: "Upstash-Forward-My-Header: my-value" -> "My-Header: my-value" You can send custom headers along with your message. To send a custom header, prefix the header name with |
Request Body schema: application/json
The raw request message passed to the endpoints as is
Will be populated from the request body
Responses
Request samples
- Payload
"string"
Update
Update an existing topic's name
path Parameters
Topic required | string Topic name or id |
Request Body schema: application/json
name required | string The new name of the topic Must only contain alphanumeric characters, underscores, dashes and periods. regex: ^[a-zA-Z0-9-_.]+$ |
Responses
Request samples
- Payload
{- "name": "string"
}