Openi DeveloperDeveloper
Referência da APIData sources

Create data source

Create a tenant data source. For `webhook` type the response includes `webhook_url`, `secret_plain` (returned only once), `status` and `listening_until`.

POST
/v1/data-sources

Authorization

ApiKeyAuth
x-api-key<token>

Tenant API key

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

type*"webhook"

Value in

  • "webhook"
name*string
config*

Response Body

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/data-sources" \  -H "Content-Type: application/json" \  -d '{    "type": "webhook",    "name": "string",    "config": {      "secret": "stringstringstri"    }  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "type": "webhook",  "name": "string",  "created_at": "2019-08-24T14:15:22Z",  "status": "pending_first_sample",  "listening_until": "2019-08-24T14:15:22Z",  "webhook_url": "string",  "secret_plain": "string",  "config": {}}