Omniplex Docs
PopplioStaging

Webhooks

Webhooks are a way to receive events from Infinity Bot List in real time. You can use webhooks to receive events such as new votes, new reviews, and more.

GET
/{target_type}/{target_id}/webhooks

Get Webhooks

Gets a list of webhooks of a specific entity (excluding the secret due to security concerns). Requires the Get Webhooks permission

/{target_type}/{target_id}/webhooks

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Bot-Auth<token>

Requires a bot token. Should be prefixed with Bot in Authorization header.

In: header

Server-Auth<token>

Requires a server API session token. Should be prefixed with Server in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Path Parameters

target_type
Required
string

The entity type to return webhooks for.

target_id
Required
string

The target ID to return webhooks for

curl -X GET "https://spider-staging.omniplex.gg/string/string/webhooks" \
  -H "User-Auth: <token>"

Success

[
  {
    "broken": true,
    "created_at": "2019-08-24T14:15:22Z",
    "event_whitelist": [
      "string"
    ],
    "failed_requests": 0,
    "hmac_auth": true,
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "name": "string",
    "simple_auth": true,
    "target_id": "string",
    "target_type": "string",
    "url": "string"
  }
]

POST
/{target_type}/{target_id}/webhooks

Create Webhook

Creates a new webhook for an entity. Returns 204 on success. Requires Create Webhooks permission

/{target_type}/{target_id}/webhooks

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Bot-Auth<token>

Requires a bot token. Should be prefixed with Bot in Authorization header.

In: header

Server-Auth<token>

Requires a server API session token. Should be prefixed with Server in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Request Body

application/jsonRequired

event_whitelistarray<string>

The events that are whitelisted for this webhook. Note that if unset, all events are whitelisted.

hmac_authboolean

Recommended auth mode: plain JSON body, signed with HMAC-SHA256 in the X-Webhook-Signature header (same shape as GitHub/Stripe webhooks).

namestring

The name of the webhook.

secretstring

The secret of the webhook, only needed for custom (non-discord) webhooks

simple_authboolean

Legacy simple auth: plain JSON body, raw secret in the Authorization header. Prefer hmac_auth for new webhooks. Ignored if hmac_auth is set.

urlstring

The URL of the webhook.

Path Parameters

target_type
Required
string

The target type of the tntity

target_id
Required
string

The target ID of the entity

curl -X POST "https://spider-staging.omniplex.gg/string/string/webhooks" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "event_whitelist": [
      "string"
    ],
    "hmac_auth": true,
    "name": "string",
    "secret": "string",
    "simple_auth": true,
    "url": "string"
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

POST
/{target_type}/{target_id}/webhooks/{webhook_id}

Update Webhook

Updates an existing webhook on an entity. Returns 204 on success. Requires Edit Webhooks permission

/{target_type}/{target_id}/webhooks/{webhook_id}

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Bot-Auth<token>

Requires a bot token. Should be prefixed with Bot in Authorization header.

In: header

Server-Auth<token>

Requires a server API session token. Should be prefixed with Server in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Request Body

application/jsonRequired

event_whitelistarray<string>

The events that are whitelisted for this webhook. Note that if unset, all events are whitelisted.

hmac_authboolean

Recommended auth mode: plain JSON body, signed with HMAC-SHA256 in the X-Webhook-Signature header (same shape as GitHub/Stripe webhooks).

namestring

The name of the webhook.

secretstring

The secret of the webhook, only needed for custom (non-discord) webhooks

simple_authboolean

Legacy simple auth: plain JSON body, raw secret in the Authorization header. Prefer hmac_auth for new webhooks. Ignored if hmac_auth is set.

urlstring

The URL of the webhook.

Path Parameters

target_type
Required
string

The target type of the entity

target_id
Required
string

The target ID of the entity

webhook_id
Required
string

The ID of the webhook to update

curl -X POST "https://spider-staging.omniplex.gg/string/string/webhooks/string" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "event_whitelist": [
      "string"
    ],
    "hmac_auth": true,
    "name": "string",
    "secret": "string",
    "simple_auth": true,
    "url": "string"
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

DELETE
/{target_type}/{target_id}/webhooks/{webhook_id}

Delete Webhook

Updates an existing webhook on an entity. Returns 204 on success. Requires Edit Webhooks permission

/{target_type}/{target_id}/webhooks/{webhook_id}

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Bot-Auth<token>

Requires a bot token. Should be prefixed with Bot in Authorization header.

In: header

Server-Auth<token>

Requires a server API session token. Should be prefixed with Server in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Path Parameters

target_type
Required
string

The target type of the entity

target_id
Required
string

The target ID of the entity

webhook_id
Required
string

The ID of the webhook to delete

curl -X DELETE "https://spider-staging.omniplex.gg/string/string/webhooks/string" \
  -H "User-Auth: <token>"

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}

GET
/{target_type}/{target_id}/webhooks/logs

Get Webhook Logs

Gets webhook logs of a specific entity. Paginated to 10 at a time. Requires authentication

/{target_type}/{target_id}/webhooks/logs

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Bot-Auth<token>

Requires a bot token. Should be prefixed with Bot in Authorization header.

In: header

Server-Auth<token>

Requires a server API session token. Should be prefixed with Server in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Path Parameters

target_type
Required
string

The target type of the entity

target_id
Required
string

The target ID of the entity

Query Parameters

pagestring

The page number

curl -X GET "https://spider-staging.omniplex.gg/string/string/webhooks/logs?page=string" \
  -H "User-Auth: <token>"

Success

{
  "count": 18446744073709552000,
  "per_page": 18446744073709552000,
  "results": [
    {
      "bad_intent": true,
      "created_at": "2019-08-24T14:15:22Z",
      "data": {
        "property1": null,
        "property2": null
      },
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "last_try": "2019-08-24T14:15:22Z",
      "request_headers": {
        "property1": null,
        "property2": null
      },
      "response": "string",
      "response_headers": {
        "property1": null,
        "property2": null
      },
      "state": "string",
      "status_code": 0,
      "target_id": "string",
      "target_type": "string",
      "tries": 0,
      "url": "string",
      "user": {
        "avatar": "string",
        "bot": true,
        "display_name": "string",
        "extra_data": {
          "property1": null,
          "property2": null
        },
        "flags": [
          "string"
        ],
        "id": "string",
        "status": "string",
        "username": "string"
      },
      "webhook_id": "a47606a1-5b39-4a81-9480-c2cb738ff675"
    }
  ]
}

GET
/{target_type}/{target_id}/webhooks/test

Get Test Webhook Metadata

Responds with the metadata of all webhooks that can currently be tested. Note that this does not require any specific permission

/{target_type}/{target_id}/webhooks/test

Path Parameters

target_type
Required
string

The target type of the entity

target_id
Required
string

The target ID of the entity

Query Parameters

event
Required
string

The event that is being posted

curl -X GET "https://spider-staging.omniplex.gg/string/string/webhooks/test?event=string"

Success

{
  "data": [
    {
      "type": "string"
    }
  ]
}

POST
/{target_type}/{target_id}/webhooks/test

Test Webhook

Sends a test webhook.

/{target_type}/{target_id}/webhooks/test

The Authorization access token

Authorization

User-Auth<token>

Requires a user token. Should be prefixed with User in Authorization header.

In: header

Bot-Auth<token>

Requires a bot token. Should be prefixed with Bot in Authorization header.

In: header

Server-Auth<token>

Requires a server API session token. Should be prefixed with Server in Authorization header.

In: header

Team-Auth<token>

Requires a team API session token. Should be prefixed with Team in Authorization header.

In: header

Request Body

application/jsonRequired

[key: string]unknown

Path Parameters

target_type
Required
string

The target type of the entity

target_id
Required
string

The target ID of the entity

Query Parameters

event
Required
string

The event that is being posted

curl -X POST "https://spider-staging.omniplex.gg/string/string/webhooks/test?event=string" \
  -H "User-Auth: <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "property1": null,
    "property2": null
  }'

Success

{
  "context": {
    "property1": "string",
    "property2": "string"
  },
  "message": "string"
}