# Receive a vendor webhook for an integration's shared app

> Source: https://truto.one/docs/api-reference/admin/inbound-webhooks/receive-shared-app-webhook/

`POST /integration-webhook/{integration_id}`

Resource: **Inbound webhooks**

The URL Truto registers with the vendor for an integration's shared app (Truto's own OAuth app), when the vendor sets webhooks up per app rather than per account, as HubSpot does. It receives events for every account installed on the app, across every Truto customer. Truto checks the signature with the integration's base config and its own app credentials, works out each event's lookup key (`webhook.lookup_key`), and hands each event to the active accounts that hold that key in environments that set `override.shared_app_webhooks`, before it answers. Other events are dropped before they are stored or logged. If an account can't take its events, the others still get theirs and the answer is a 500, so the vendor retries the whole request: an account can get an event twice.

**Auth:** none. Requests are checked by the integration's signature verification.

## Path parameters

- **`integration_id`** _(string, required)_
  The ID of one of Truto's own integrations (integration names are unique only within a team).

## Response body

- **`message`** _(string)_

## Errors

| Status | Description |
| :----- | :---------- |
| `400` | The body is not JSON, the integration has no shared app, no signature verification or no lookup settings, `lookup_key` does not compile, or `payload_transform`, `handle_verification` or the signature check failed. |
| `404` | The integration was not found, or is not one of Truto's own. |
| `413` | The body is larger than 1 MiB. |
| `500` | An account could not take its events for now (the other accounts got theirs). The vendor's retry delivers the whole request again, so an account can get an event twice. |

## Code examples

### curl

```bash
curl -X POST 'https://api.truto.one/integration-webhook/{integration_id}' \
  -H 'Authorization: Bearer <your_api_token>' \
  -H 'Content-Type: application/json'
```

### JavaScript

```javascript
const response = await fetch('https://api.truto.one/integration-webhook/{integration_id}', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <your_api_token>',
    'Content-Type': 'application/json',
  },
});

const data = await response.json();
console.log(data);
```

### Python

```python
import requests

url = "https://api.truto.one/integration-webhook/{integration_id}"
headers = {
    "Authorization": "Bearer <your_api_token>",
    "Content-Type": "application/json",
}
params = {
}

response = requests.post(url, headers=headers, params=params)
print(response.json())
```
