Speko Docs
API Reference

Webhooks

Create and manage organization lifecycle webhook endpoints.

GET
/v1/webhooks

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Response Body

application/json

application/json

{
  "data": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "name": "string",
      "url": "http://example.com",
      "events": [
        "call.pre_call"
      ],
      "allAgents": true,
      "agentIds": [
        "string"
      ],
      "filterTags": {
        "property1": "string",
        "property2": "string"
      },
      "headers": {
        "property1": "string",
        "property2": "string"
      },
      "authHeaders": [
        {
          "name": "string",
          "configured": true
        }
      ],
      "timeoutMs": 0,
      "signingSecretSource": "workspace",
      "hasCustomSigningSecret": true,
      "extractionFields": [
        {
          "name": "string",
          "type": "string",
          "description": "string",
          "options": [
            "string"
          ]
        }
      ],
      "legacyManaged": true,
      "createdAt": "2019-08-24T14:15:22Z",
      "updatedAt": "2019-08-24T14:15:22Z"
    }
  ]
}
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}
POST
/v1/webhooks

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "url": "http://example.com",
  "events": [
    "call.pre_call"
  ],
  "allAgents": true,
  "agentIds": [
    "string"
  ],
  "filterTags": {
    "property1": "string",
    "property2": "string"
  },
  "headers": {
    "property1": "string",
    "property2": "string"
  },
  "authHeaders": [
    {
      "name": "string",
      "configured": true
    }
  ],
  "timeoutMs": 0,
  "signingSecretSource": "workspace",
  "hasCustomSigningSecret": true,
  "extractionFields": [
    {
      "name": "string",
      "type": "string",
      "description": "string",
      "options": [
        "string"
      ]
    }
  ],
  "legacyManaged": true,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "error": "Invalid request body",
  "code": "VALIDATION_ERROR"
}
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}
{
  "error": "string",
  "code": "string"
}
GET
/v1/webhooks/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string
Formatuuid

Response Body

application/json

application/json

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "url": "http://example.com",
  "events": [
    "call.pre_call"
  ],
  "allAgents": true,
  "agentIds": [
    "string"
  ],
  "filterTags": {
    "property1": "string",
    "property2": "string"
  },
  "headers": {
    "property1": "string",
    "property2": "string"
  },
  "authHeaders": [
    {
      "name": "string",
      "configured": true
    }
  ],
  "timeoutMs": 0,
  "signingSecretSource": "workspace",
  "hasCustomSigningSecret": true,
  "extractionFields": [
    {
      "name": "string",
      "type": "string",
      "description": "string",
      "options": [
        "string"
      ]
    }
  ],
  "legacyManaged": true,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}
Empty
PATCH
/v1/webhooks/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string
Formatuuid

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "name": "string",
  "url": "http://example.com",
  "events": [
    "call.pre_call"
  ],
  "allAgents": true,
  "agentIds": [
    "string"
  ],
  "filterTags": {
    "property1": "string",
    "property2": "string"
  },
  "headers": {
    "property1": "string",
    "property2": "string"
  },
  "authHeaders": [
    {
      "name": "string",
      "configured": true
    }
  ],
  "timeoutMs": 0,
  "signingSecretSource": "workspace",
  "hasCustomSigningSecret": true,
  "extractionFields": [
    {
      "name": "string",
      "type": "string",
      "description": "string",
      "options": [
        "string"
      ]
    }
  ],
  "legacyManaged": true,
  "createdAt": "2019-08-24T14:15:22Z",
  "updatedAt": "2019-08-24T14:15:22Z"
}
{
  "error": "Invalid request body",
  "code": "VALIDATION_ERROR"
}
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}
Empty
Empty
DELETE
/v1/webhooks/{id}

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string
Formatuuid

Response Body

application/json

Empty
{
  "error": "Unauthorized",
  "code": "UNAUTHORIZED"
}
Empty