# List webhooks

Returns the webhooks on the teams the caller can read, newest first. Page with `cursor`. A tenant-rooted credential also sees the tenant’s own subscriptions. Deleted webhooks are left out.

## GET `/v1/webhooks`

### Authorization

`Authorization: Bearer <token>`

with an API key (`sfa_` prefix), an OAuth access token, a session token, or a Space machine credential (`sfm_` prefix).

### Query parameters

- `limit` **integer required**  
  min 1 · max 100 · default: 20  
- `cursor` **string**  
  min length 1 · max length 4096

### Responses

#### 200 Response for status 200

- `$schema` **string <uri>**  
  Canonical JSON Schema URL for this response body. The server also sends it in the `Link: rel="describedby"` response header.
- `data` **object[] required**

Array of `object`

- `id` **string required**
  - `url` **string <uri> required**
  - `events` **string[] required**  
  Event filters this webhook is subscribed to.
  - `status` **string required**  
    `active` delivers. `failing` follows 8 consecutive failures and still delivers. `disabled` follows 32 and stops. `deleted` is kept for audit only. Any success resets the count.  
  Allowed: `active`, `disabled`, `failing`, `deleted`
  - `secret` **string**  
  Signing secret, present only in the response that created the webhook or rotated its secret. Store it then; it cannot be read back.
  - `secretPreview` **string required**
  - `previousSecretExpiresAt` **string<date-time> | any required**  
    ISO 8601 timestamp when the secret replaced by the last rotation stops being accepted. Null when no earlier secret is still valid.
  - `createdAt` **string<date-time> required**  
  - `updatedAt` **string<date-time> required**

#### pagination **object required**

- `nextCursor` **string | any required**  
  Cursor for the next page. Null on the last page.
- `hasMore` **boolean required**  
  True when another page exists.

#### Error Responses

- `$schema` **string <uri>**  
- `type` **string required**  
- `title` **string required**  
- `status` **integer required**  
- `detail` **string required**  
- `code` **string required**  
- `pointer` **string**  
- `details` **object**  
- `suggestions` **string[]**  
- `next` **string[]**  
- `requestId` **string required**

### Try it

#### Server

Base URL: `https://api.spacefast.com`

---

**Request Example**
```bash
curl -X GET "https://api.spacefast.com/v1/webhooks?limit=20" \ 
  -H "Authorization: Bearer YOUR_TOKEN"
```

**Response Example**
```json
{
  "$schema": "http://example.com",
  "data": [
    {
      "id": "string",
      "url": "http://example.com",
      "events": [
        "string"
      ],
      "status": "active",
      "secret": "string",
      "secretPreview": "string",
      "previousSecretExpiresAt": "2019-08-24T14:15:22Z",
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ],
  "pagination": {
    "nextCursor": "string",
    "hasMore": true
  }
}
```
