# Webhook Subscriptions

> For AI agents: the index of these docs is at https://shippified.net/docs/llms.txt (every page it lists has a Markdown version like this one).

## List your outbound webhook subscriptions.

**`GET https://shippified.net/api/webhook-subscriptions`** — List your outbound webhook subscriptions.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `limit` | query | integer | no |  |
| `offset` | query | integer | no |  |

### Responses

**200** — OK

```json
{}
```

### Code samples

**cURL**

```curl
curl -X GET "https://shippified.net/api/webhook-subscriptions"
```

**TypeScript**

```typescript
const res = await fetch('https://shippified.net/api/webhook-subscriptions', {
  method: 'GET',
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "GET",
    "https://shippified.net/api/webhook-subscriptions",
)
data = res.json()
```

**Go**

```go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://shippified.net/api/webhook-subscriptions", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://shippified.net/api/webhook-subscriptions');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('https://shippified.net/api/webhook-subscriptions')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://shippified.net/api/webhook-subscriptions"))
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Create a subscription. Returns the raw signing secret exactly once.

**`POST https://shippified.net/api/webhook-subscriptions`** — Create a subscription. Returns the raw signing secret exactly once.

### Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | yes |  |
| `eventTypes` | object[] | yes |  |
| `active` | boolean | no |  |

```json
{
  "url": "string",
  "eventTypes": [
    "order.created"
  ],
  "active": true
}
```

### Responses

**201** — Created. The `secret` field is only present in this response.

```json
{}
```

**400** — Invalid url or eventTypes.

**403** — Called with a read-only API key.

```json
{
  "error": "string"
}
```

**429** — Subscription limit reached (25 per workspace).

### Code samples

**cURL**

```curl
curl -X POST "https://shippified.net/api/webhook-subscriptions" \
  -H "Content-Type: application/json" \
  -d '{"url":"string","eventTypes":["order.created"],"active":true}'
```

**TypeScript**

```typescript
const res = await fetch('https://shippified.net/api/webhook-subscriptions', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"url":"string","eventTypes":["order.created"],"active":true}),
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "POST",
    "https://shippified.net/api/webhook-subscriptions",
    headers={
    "Content-Type": "application/json",
    },
    json={"url": "string", "eventTypes": ["order.created"], "active": True},
)
data = res.json()
```

**Go**

```go
package main

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

func main() {
	req, _ := http.NewRequest("POST", "https://shippified.net/api/webhook-subscriptions", strings.NewReader(`{"url":"string","eventTypes":["order.created"],"active":true}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://shippified.net/api/webhook-subscriptions');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"url":"string","eventTypes":["order.created"],"active":true}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('https://shippified.net/api/webhook-subscriptions')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"url":"string","eventTypes":["order.created"],"active":true}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://shippified.net/api/webhook-subscriptions"))
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"url\":\"string\",\"eventTypes\":[\"order.created\"],\"active\":true}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Get one subscription.

**`GET https://shippified.net/api/webhook-subscriptions/{id}`** — Get one subscription.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Responses

**200** — OK

```json
{
  "id": "string",
  "userId": "string",
  "url": "string",
  "prefix": "string",
  "eventTypes": [
    "order.created"
  ],
  "active": true,
  "failureCount": 0,
  "needsSecretRotation": true,
  "lastFiredAt": "2024-01-01T00:00:00Z",
  "lastError": "string",
  "createdAt": "2024-01-01T00:00:00Z"
}
```

**404** — Not found.

### Code samples

**cURL**

```curl
curl -X GET "https://shippified.net/api/webhook-subscriptions/{id}"
```

**TypeScript**

```typescript
const res = await fetch('https://shippified.net/api/webhook-subscriptions/{id}', {
  method: 'GET',
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "GET",
    "https://shippified.net/api/webhook-subscriptions/{id}",
)
data = res.json()
```

**Go**

```go
package main

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

func main() {
	req, _ := http.NewRequest("GET", "https://shippified.net/api/webhook-subscriptions/{id}", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://shippified.net/api/webhook-subscriptions/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('https://shippified.net/api/webhook-subscriptions/{id}')
req = Net::HTTP::Get.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://shippified.net/api/webhook-subscriptions/{id}"))
    .GET()
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Delete subscription.

**`DELETE https://shippified.net/api/webhook-subscriptions/{id}`** — Delete subscription.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Responses

**200** — Deleted.

**403** — Called with a read-only API key.

```json
{
  "error": "string"
}
```

**404** — Not found.

### Code samples

**cURL**

```curl
curl -X DELETE "https://shippified.net/api/webhook-subscriptions/{id}"
```

**TypeScript**

```typescript
const res = await fetch('https://shippified.net/api/webhook-subscriptions/{id}', {
  method: 'DELETE',
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "DELETE",
    "https://shippified.net/api/webhook-subscriptions/{id}",
)
data = res.json()
```

**Go**

```go
package main

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

func main() {
	req, _ := http.NewRequest("DELETE", "https://shippified.net/api/webhook-subscriptions/{id}", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://shippified.net/api/webhook-subscriptions/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('https://shippified.net/api/webhook-subscriptions/{id}')
req = Net::HTTP::Delete.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://shippified.net/api/webhook-subscriptions/{id}"))
    .method("DELETE", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Update url / eventTypes / active. A new url goes through the same validation as create (private / loopback targets are rejected in production); the signing secret is unchanged.

**`PATCH https://shippified.net/api/webhook-subscriptions/{id}`** — Update url / eventTypes / active. A new url goes through the same validation as create (private / loopback targets are rejected in production); the signing secret is unchanged.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | string | no |  |
| `eventTypes` | object[] | no |  |
| `active` | boolean | no |  |

```json
{
  "url": "string",
  "eventTypes": [
    "order.created"
  ],
  "active": true
}
```

### Responses

**200** — Updated.

```json
{
  "id": "string",
  "userId": "string",
  "url": "string",
  "prefix": "string",
  "eventTypes": [
    "order.created"
  ],
  "active": true,
  "failureCount": 0,
  "needsSecretRotation": true,
  "lastFiredAt": "2024-01-01T00:00:00Z",
  "lastError": "string",
  "createdAt": "2024-01-01T00:00:00Z"
}
```

**400** — Invalid url or eventTypes.

**403** — Called with a read-only API key.

```json
{
  "error": "string"
}
```

**404** — Not found.

### Code samples

**cURL**

```curl
curl -X PATCH "https://shippified.net/api/webhook-subscriptions/{id}" \
  -H "Content-Type: application/json" \
  -d '{"url":"string","eventTypes":["order.created"],"active":true}'
```

**TypeScript**

```typescript
const res = await fetch('https://shippified.net/api/webhook-subscriptions/{id}', {
  method: 'PATCH',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"url":"string","eventTypes":["order.created"],"active":true}),
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "PATCH",
    "https://shippified.net/api/webhook-subscriptions/{id}",
    headers={
    "Content-Type": "application/json",
    },
    json={"url": "string", "eventTypes": ["order.created"], "active": True},
)
data = res.json()
```

**Go**

```go
package main

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

func main() {
	req, _ := http.NewRequest("PATCH", "https://shippified.net/api/webhook-subscriptions/{id}", strings.NewReader(`{"url":"string","eventTypes":["order.created"],"active":true}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://shippified.net/api/webhook-subscriptions/{id}');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"url":"string","eventTypes":["order.created"],"active":true}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('https://shippified.net/api/webhook-subscriptions/{id}')
req = Net::HTTP::Patch.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"url":"string","eventTypes":["order.created"],"active":true}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://shippified.net/api/webhook-subscriptions/{id}"))
    .header("Content-Type", "application/json")
    .method("PATCH", BodyPublishers.ofString("{\"url\":\"string\",\"eventTypes\":[\"order.created\"],\"active\":true}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Send a synthetic event so you can verify your receiver round-trip.

**`POST https://shippified.net/api/webhook-subscriptions/{id}/test`** — Send a synthetic event so you can verify your receiver round-trip.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Request body (`application/json`)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `eventType` | string | no | Event types our outbound webhooks can dispatch. |

```json
{
  "eventType": "order.created"
}
```

### Responses

**200** — Receiver round-trip result (does not count toward failureCount).

```json
{
  "ok": true,
  "status": 0,
  "error": "string"
}
```

**403** — Called with a read-only API key.

```json
{
  "error": "string"
}
```

### Code samples

**cURL**

```curl
curl -X POST "https://shippified.net/api/webhook-subscriptions/{id}/test" \
  -H "Content-Type: application/json" \
  -d '{"eventType":"order.created"}'
```

**TypeScript**

```typescript
const res = await fetch('https://shippified.net/api/webhook-subscriptions/{id}/test', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"eventType":"order.created"}),
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "POST",
    "https://shippified.net/api/webhook-subscriptions/{id}/test",
    headers={
    "Content-Type": "application/json",
    },
    json={"eventType": "order.created"},
)
data = res.json()
```

**Go**

```go
package main

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

func main() {
	req, _ := http.NewRequest("POST", "https://shippified.net/api/webhook-subscriptions/{id}/test", strings.NewReader(`{"eventType":"order.created"}`))
	req.Header.Set("Content-Type", "application/json")
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://shippified.net/api/webhook-subscriptions/{id}/test');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ['Content-Type: application/json']);
curl_setopt($ch, CURLOPT_POSTFIELDS, '{"eventType":"order.created"}');
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('https://shippified.net/api/webhook-subscriptions/{id}/test')
req = Net::HTTP::Post.new(uri)
req['Content-Type'] = 'application/json'
req.body = '{"eventType":"order.created"}'
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://shippified.net/api/webhook-subscriptions/{id}/test"))
    .header("Content-Type", "application/json")
    .method("POST", BodyPublishers.ofString("{\"eventType\":\"order.created\"}"))
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

## Rotate the signing secret. Returns the new raw secret once.

**`POST https://shippified.net/api/webhook-subscriptions/{id}/rotate-secret`** — Rotate the signing secret. Returns the new raw secret once.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `id` | path | string | yes |  |

### Responses

**200** — Rotated. The `secret` field is only present in this response.

```json
{}
```

**403** — Called with a read-only API key.

```json
{
  "error": "string"
}
```

### Code samples

**cURL**

```curl
curl -X POST "https://shippified.net/api/webhook-subscriptions/{id}/rotate-secret"
```

**TypeScript**

```typescript
const res = await fetch('https://shippified.net/api/webhook-subscriptions/{id}/rotate-secret', {
  method: 'POST',
});
const data = await res.json();
```

**Python**

```python
import requests

res = requests.request(
    "POST",
    "https://shippified.net/api/webhook-subscriptions/{id}/rotate-secret",
)
data = res.json()
```

**Go**

```go
package main

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

func main() {
	req, _ := http.NewRequest("POST", "https://shippified.net/api/webhook-subscriptions/{id}/rotate-secret", nil)
	res, _ := http.DefaultClient.Do(req)
	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)
	fmt.Println(string(body))
}
```

**PHP**

```php
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://shippified.net/api/webhook-subscriptions/{id}/rotate-secret');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
```

**Ruby**

```ruby
require 'net/http'
require 'uri'

uri = URI('https://shippified.net/api/webhook-subscriptions/{id}/rotate-secret')
req = Net::HTTP::Post.new(uri)
res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == 'https') do |http|
  http.request(req)
end
puts res.body
```

**Java**

```java
import java.net.URI;
import java.net.http.*;
import java.net.http.HttpRequest.BodyPublishers;

HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://shippified.net/api/webhook-subscriptions/{id}/rotate-secret"))
    .method("POST", BodyPublishers.noBody())
    .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```

---

## For AI agents

- This page for a human reader: https://shippified.net/docs/ref-webhook-subscriptions
- The whole space as one Markdown file: https://shippified.net/docs/llms-full.txt
- Live search + fetch over MCP: https://shippified.net/docs/_api/public/orgs/5b8789b1-481a-41f5-8e5a-5f30d11f5151/spaces/ae0c5af4-cc84-4899-9078-2faf8e7a6fc5/mcp
  - Install (Claude CLI): `claude mcp add api-docs --transport http https://shippified.net/docs/_api/public/orgs/5b8789b1-481a-41f5-8e5a-5f30d11f5151/spaces/ae0c5af4-cc84-4899-9078-2faf8e7a6fc5/mcp`

This Markdown is the same content the page renders — safe to quote and to ground answers in.
