---
agentTools:
  projectIndex: https://developers.pipefy.com/llms.txt
---

# Webhooks for User Management

Pipefy released a new set of functionalities in our GraphQL API to enable user management in Organizations, Pipes and Tables.

We’ve created a new level of webhooks under organizations. It will listen to events in organizations like when inviting a user, accepting invitations, changing roles or if the user was removed from organization.

All webhook creation must be executed by organization Admin users.

## createOrganizationWebhook

**New actions:\&#xA;**

* user.invitation\_sent
* user.invitation\_accepted
* user.removal\_from\_org
* user.role\_set

```json
mutation {
  createOrganizationWebhook(input: {
    organization_id: 22,
    actions: [
      "user.invitation_sent", "user.invitation_accepted", "user.removal_from_org", "user.role_set"
    ],
    name: "new webhook",
    url:"https://endpoint.com"
  }) {
    clientMutationId
  }
}
```

> 👍 You can check the GraphQL specification of the new mutation here:
>
> <https://api-docs.pipefy.com/reference/mutations/createOrganizationWebhook/>

## createWebhook

**New actions:\&#xA;**

* user.removal\_from\_pipe
* user.removal\_from\_table
* user.role\_set

**- For Pipe\&#xA;**

```json
mutation {
  createWebhook(input: {
   	pipe_id: 22,
    actions: [
      "user.removal_from_pipe", "user.role_set"
    ],
    name: "new webhook",
    url:"https://endpoint.com"
  }) {
    clientMutationId
  }
}
```

**- For Table**

```json
mutation {
  createWebhook(input: {
   	table_id: "ZdeRdE",
    actions: [
      "user.removal_from_table", "user.role_set"
    ],
    name: "new webhook",
    url:"https://endpoint.com"
  }) {
    clientMutationId
  }
}
```

> 👍 You can check the GraphQL specification of the new mutation here:
>
> <https://api-docs.pipefy.com/reference/mutations/createWebhook/>

## How to consult your webhooks

You can list all your webhooks using a query.

**- For organizations:**

```json
{
  organization(id: 300623467) {
    id
    webhooks {
      id
      actions
      headers
      name
      url
    }
  }
}
```

**- For pipes:**

```json
{
  pipe(id: 301858363){
    id
    webhooks {
      id
      name
      headers
      actions
      url
    }
  }
}
```

**- For Tables:**

```json
{
  table(id: 301858363) {
    id
    webhooks{
      id
      name
      headers
      actions
      url
    }
  }
}
```

> 📘 Check also:
>
> **updateWebhook**: <https://api-docs.pipefy.com/reference/mutations/updateWebhook/>\
> **deleteWebhook**: <https://api-docs.pipefy.com/reference/mutations/deleteWebhook/>\
> **deleteOrganizationWebhook**: <https://api-docs.pipefy.com/reference/mutations/createOrganizationWebhook/>