Skip to main content
POST
/
v1
/
events
/
{id}
/
retry
Retry a failed event
curl --request POST \
  --url https://api.scrip.dev/v1/events/{id}/retry \
  --header 'X-API-Key: <api-key>'
import requests

url = "https://api.scrip.dev/v1/events/{id}/retry"

headers = {"X-API-Key": "<api-key>"}

response = requests.post(url, headers=headers)

print(response.text)
const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};

fetch('https://api.scrip.dev/v1/events/{id}/retry', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.scrip.dev/v1/events/{id}/retry",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://api.scrip.dev/v1/events/{id}/retry"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("X-API-Key", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.scrip.dev/v1/events/{id}/retry")
.header("X-API-Key", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.scrip.dev/v1/events/{id}/retry")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "event_id": "9d5f7d4a-18f8-4b73-9e26-7b5a0b5bb0d1",
  "message": "Event queued for retry",
  "previous_error": "action CREDIT failed: amount exceeds asset scale",
  "previous_status": "FAILED",
  "status": "PENDING"
}
{
"code": "bad_request",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Invalid request parameters"
}
{
"code": "unauthorized",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Missing or invalid credentials"
}
{
"code": "forbidden",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Insufficient permissions for this action"
}
{
"code": "not_found",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Resource not found"
}
{
"code": "conflict",
"details": {
"expected": "uuid",
"field": "asset_id",
"fields": [
{
"expected": "<unknown>",
"field": "amount",
"message": "This field is required",
"reason": "required",
"received": "-10.00"
}
],
"reason": "invalid",
"received": "not-a-uuid"
},
"message": "Resource already exists or state conflict"
}
{
"code": "internal_error",
"message": "An internal error occurred"
}
Requeues a FAILED event for reprocessing. The event is returned to PENDING status for a fresh set of processing attempts with exponential backoff. Only events in FAILED status can be retried. Events in any other status (RECEIVED, PENDING, PROCESSING, COMPLETED) return 409 Conflict. This is useful after fixing the underlying issue (such as a misconfigured rule or a missing participant) that caused the original failure.
For usage patterns and examples, see the Event Processing guide.

Authorizations

X-API-Key
string
header
required

API key passed in the X-API-Key header.

Path Parameters

id
string<uuid>
required

Event ID

Response

Event queued for retry

event_id
string<uuid>

ID of the event being retried

Example:

"9d5f7d4a-18f8-4b73-9e26-7b5a0b5bb0d1"

message
string

Confirmation message

Example:

"Event queued for retry"

previous_error
string

Error message from the previous failed attempt

Example:

"action CREDIT failed: amount exceeds asset scale"

previous_status
string

Status the event was in before retry (always FAILED)

Example:

"FAILED"

status
string

New status after retry (always PENDING)

Example:

"PENDING"