SpiderMail Webhooks
4 endpoints from the published OpenAPI import.
GET/api/v1/mail/webhooks
List Webhooks
List this client's registered inbound webhooks.
Try it
Examples
cURL
curl -X GET 'https://spideriq.ai/api/v1/mail/webhooks' \
-H 'Authorization: Bearer <token>'Python
import httpx
resp = httpx.get(
"https://spideriq.ai/api/v1/mail/webhooks",
headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())JavaScript
const resp = await fetch("https://spideriq.ai/api/v1/mail/webhooks", {
method: "GET",
headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);Go
package main
import (
"net/http"
)
func main() {
req, _ := http.NewRequest("GET", "https://spideriq.ai/api/v1/mail/webhooks", nil)
req.Header.Set("Authorization", "Bearer <token>")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
| Status | Description |
|---|---|
200 | Successful Response |
POST/api/v1/mail/webhooks
Create Webhook
Register a new inbound webhook for this client.
Try it
Examples
cURL
curl -X POST 'https://spideriq.ai/api/v1/mail/webhooks' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"target_url": "https://example.com",
"secret": "string",
"events": [
"string"
],
"mailbox_filter": [
"string"
],
"description": "string",
"is_active": true
}'Python
import httpx
resp = httpx.post(
"https://spideriq.ai/api/v1/mail/webhooks",
headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
json={"target_url": "https://example.com", "secret": "string", "events": ["string"], "mailbox_filter": ["string"], "description": "string", "is_active": true},
)
resp.raise_for_status()
print(resp.json())JavaScript
const resp = await fetch("https://spideriq.ai/api/v1/mail/webhooks", {
method: "POST",
headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
body: JSON.stringify({"target_url": "https://example.com", "secret": "string", "events": ["string"], "mailbox_filter": ["string"], "description": "string", "is_active": true})
});
const data = await resp.json();
console.log(data);Go
package main
import (
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{"target_url": "https://example.com", "secret": "string", "events": ["string"], "mailbox_filter": ["string"], "description": "string", "is_active": true}`)
req, _ := http.NewRequest("POST", "https://spideriq.ai/api/v1/mail/webhooks", body)
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
| Status | Description |
|---|---|
201 | Successful Response |
422 | Validation Error |
PATCH/api/v1/mail/webhooks/{webhook_id}
Update Webhook
Update a webhook. Only the owning client may mutate it.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
webhook_id | path | string | true |
Try it
Examples
cURL
curl -X PATCH 'https://spideriq.ai/api/v1/mail/webhooks/{webhook_id}' \
-H 'Authorization: Bearer <token>' \
-H 'Content-Type: application/json' \
-d '{
"target_url": "https://example.com",
"secret": "string",
"events": [
"string"
],
"mailbox_filter": [
"string"
],
"description": "string",
"is_active": true
}'Python
import httpx
resp = httpx.patch(
"https://spideriq.ai/api/v1/mail/webhooks/{webhook_id}",
headers={"Authorization": "Bearer <token>", "Content-Type": "application/json"},
json={"target_url": "https://example.com", "secret": "string", "events": ["string"], "mailbox_filter": ["string"], "description": "string", "is_active": true},
)
resp.raise_for_status()
print(resp.json())JavaScript
const resp = await fetch("https://spideriq.ai/api/v1/mail/webhooks/{webhook_id}", {
method: "PATCH",
headers: { "Authorization": "Bearer <token>", "Content-Type": "application/json" },
body: JSON.stringify({"target_url": "https://example.com", "secret": "string", "events": ["string"], "mailbox_filter": ["string"], "description": "string", "is_active": true})
});
const data = await resp.json();
console.log(data);Go
package main
import (
"net/http"
"strings"
)
func main() {
body := strings.NewReader(`{"target_url": "https://example.com", "secret": "string", "events": ["string"], "mailbox_filter": ["string"], "description": "string", "is_active": true}`)
req, _ := http.NewRequest("PATCH", "https://spideriq.ai/api/v1/mail/webhooks/{webhook_id}", body)
req.Header.Set("Authorization", "Bearer <token>")
req.Header.Set("Content-Type", "application/json")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
| Status | Description |
|---|---|
200 | Successful Response |
422 | Validation Error |
DELETE/api/v1/mail/webhooks/{webhook_id}
Delete Webhook
Delete a webhook. Only the owning client may delete it.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
webhook_id | path | string | true |
Try it
Examples
cURL
curl -X DELETE 'https://spideriq.ai/api/v1/mail/webhooks/{webhook_id}' \
-H 'Authorization: Bearer <token>'Python
import httpx
resp = httpx.delete(
"https://spideriq.ai/api/v1/mail/webhooks/{webhook_id}",
headers={"Authorization": "Bearer <token>"},
)
resp.raise_for_status()
print(resp.json())JavaScript
const resp = await fetch("https://spideriq.ai/api/v1/mail/webhooks/{webhook_id}", {
method: "DELETE",
headers: { "Authorization": "Bearer <token>" }
});
const data = await resp.json();
console.log(data);Go
package main
import (
"net/http"
)
func main() {
req, _ := http.NewRequest("DELETE", "https://spideriq.ai/api/v1/mail/webhooks/{webhook_id}", nil)
req.Header.Set("Authorization", "Bearer <token>")
resp, _ := http.DefaultClient.Do(req)
defer resp.Body.Close()
}Responses
| Status | Description |
|---|---|
204 | Successful Response |
422 | Validation Error |