Skip to content

Webhook configuration

The webhook configuration lists the HTTPS endpoints ObjectsGrid calls when your objects change, and the events each one receives. There is one configuration per Organization Account, with the id webhooks-config: create it once with POST /webhooks, then read it and change it at /webhooks/webhooks-config.

The Webhooks guide explains the events and how to verify a delivery.

JSON Schema

Example

Create one with POST /webhooks:

{
  "webhooksEndpointConfig": [
    {
      "endpoint": "https://hooks.example.com/objectsgrid",
      "events": [
        "ProductCreated",
        "ProductUpdated",
        "ProductPatched",
        "ProductDeleted"
      ],
      "enabled": true
    }
  ]
}

Fields

Required: webhooksEndpointConfig.

Field Type Required Description
id string The object's id. Assigned by ObjectsGrid when the object is created.
orgAcctID string Derived from the access token.
webhooksEndpointConfig list of WebhookEndpointConfig Yes
objectMeta ObjectMeta

WebhookEndpointConfig

Field Type Required Description
endpoint URL Yes
events list of WebhookEvent Yes
enabled boolean Yes

REST API

Base URL https://apis.objectsgrid.com. Every request sends the X-ObjectsGrid-AccessPoint and Authorization: Bearer <access token> headers; see the REST API guide.

Operation Request
Create POST /webhooks
Retrieve GET /webhooks/{id}
Replace PUT /webhooks/{id}
Update some fields PATCH /webhooks/{id}

The OpenAPI contract, with every parameter and response: Webhooks (JSON).

GraphQL

Endpoint POST https://apis.objectsgrid.com/graphql; see the GraphQL guide.

Operation Field
Query webhook(id: ID!): Webhook
Mutation createWebhook(input: CreateWebhookInput!): Webhook!
Mutation updateWebhook(input: UpdateWebhookInput!, expectedVersion: String): Webhook!

Webhook events

Subscribe to these events in your webhook configuration to be called when a Webhook changes:

WebhookCreated, WebhookUpdated, WebhookPatched.