Skip to content

Webhook Schemas

DeliveryTicketDTO

Example

1
2
3
4
5
{
  "delivery_tag": "063c5237-b0ae-7d93-8000-6817f091458c",
  "endpoint_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "url": "https://example.domain.name/prosa-webhook"
}

Properties

Name Type Optional Description
delivery_tag string(uuid) false -
endpoint_id string(uuid) false -
url string false -

WebhookDeliveryDTO

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
{
  "delivery_id": "9892f438-d31c-4ff2-bc84-146525b292ff",
  "event_id": "a7a26ff2-e851-45b6-9634-d595f45458b7",
  "endpoint_id": "e9ce0d4f-d433-423d-9497-4c000544106c",
  "delivery": "2023-01-17T14:26:22Z",
  "request_method": "string",
  "request_headers": {
    "host": "127.0.0.1:10010",
    "accept": "*/*",
    "connection": "keep-alive",
    "user-agent": "prosa-speech-api",
    "content-type": "application/json",
    "x-prosa-event": "stt.jobs.completed",
    "content-length": "3000",
    "accept-encoding": "gzip, deflate, br",
    "x-prosa-signature": "t=1673940396,v1=0a7600b08eb590f9f41445f30dfe76c04cf20119918b6d14c2beb16b826142eb",
    "x-prosa-event-uuid": "a7a26ff2-e851-45b6-9634-d595f45458b7"
  },
  "request_body": {
    "model": {
      "name": "stt-general",
      "label": "ASR General",
      "domain": "general",
      "acoustic": "recording",
      "channels": 1,
      "language": "Bahasa Indonesia",
      "samplerate": 16000
    },
    "job_id": "063c64da-180d-731e-8000-d11a28529080",
    "result": {
      "data": [
        {
          "final": true,
          "channel": 0,
          "time_end": 6.470000009536743,
          "time_start": 1,
          "transcript": "hasil dari pekerjaan ini cukup memuaskan",
          "speaker_tag": 1
        }
      ]
    },
    "request": {
      "uri": "https://example.domain.name/media/example_audio.wav",
      "label": "Example audio",
      "channels": 1,
      "duration": 6.766625,
      "mime_type": "audio/wav",
      "sample_rate": 8000
    },
    "created_at": "2023-01-17T14:26:25.505439",
    "job_config": {
      "wait": false,
      "engine": "stt-general",
      "speaker_count": 1,
      "include_filler": false,
      "include_partial_results": false
    },
    "modified_at": "2023-01-17T14:26:26.619771"
  },
  "response_status": 200,
  "response_headers": {
    "date": "Tue, 17 Jan 2023 14:26:23 GMT",
    "server": "uvicorn",
    "content-length": "0"
  },
  "response_body": "",
  "elapsed_time": 0.32921
}

Properties

Name Type Optional Description
delivery_id string(uuid) false -
event_id string(uuid) false -
endpoint_id string(uuid) false -
delivery string(date-time) false -
request_method string false -
request_headers object false -
request_body object false -
response_status integer false -
response_headers object false -
response_body string false -
elapsed_time number false -

WebhookEndpointCreateDTO

Example

1
2
3
4
{
  "url": "https://example.domain.name/prosa-webhook",
  "ssl_verification": true
}

Properties

Name Type Optional Description
url string false The callback url for webhook events.
event_filters [string] false If not empty, only send event of types in the list.
ssl_verification boolean true Verify ssl certificate. Set this value to false only for testing.
secret_key string true The secret key to use for message signing. Leave it empty for randomly generated key.

WebhookEndpointDTO

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "url": "https://example.domain.name/prosa-webhook",
  "secrets": [
    {
      "id": "063c6473-fa0c-79b7-8000-760e63e5b4f7",
      "key": "a35837907f71e9eaf52848b54ca11135187e9e30e23f2ac001eabbc3321e9bdd"
    }
  ],
  "event_filters": [],
  "ssl_verification": true
}

Properties

Name Type Optional Description
id string(uuid) false -
url string false -
secrets [WebhookSecretDTO] true -
event_filters [string] true -
ssl_verification boolean false -

WebhookEndpointListingDTO

Example

1
2
3
4
5
6
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "url": "https://example.domain.name/prosa-webhook",
  "event_filters": [],
  "ssl_verification": true
}

Properties

Name Type Optional Description
id string(uuid) false -
url string false -
event_filters [string] true -
ssl_verification boolean false -

WebhookEndpointUpdateDTO

Example

1
2
3
4
{
  "url": "https://example.domain.name/prosa-webhook",
  "ssl_verification": false
}

Properties

Name Type Optional Description
url string false The callback url for webhook events.
event_filters [string] false If not empty, only send event of types in the list.
ssl_verification boolean true Verify ssl certificate. Set this value to false only for testing.

WebhookEventDTO

Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "event_type": "stt.jobs.completed",
  "created_at": "2023-01-17T14:26:27.329321",
  "data": {
    "model": {
      "name": "stt-general",
      "label": "ASR General",
      "domain": "general",
      "acoustic": "recording",
      "channels": 1,
      "language": "Bahasa Indonesia",
      "samplerate": 16000
    },
    "job_id": "063c64da-180d-731e-8000-d11a28529080",
    "result": {
      "data": [
        {
          "final": true,
          "channel": 0,
          "time_end": 6.470000009536743,
          "time_start": 1,
          "transcript": "hasil dari pekerjaan ini cukup memuaskan",
          "speaker_tag": 1
        }
      ]
    },
    "request": {
      "uri": "https://example.domain.name/media/example_audio.wav",
      "label": "Example audio",
      "channels": 1,
      "duration": 6.766625,
      "mime_type": "audio/wav",
      "sample_rate": 8000
    },
    "created_at": "2023-01-17T14:26:25.505439",
    "job_config": {
      "wait": false,
      "engine": "stt-general",
      "speaker_count": 1,
      "include_filler": false,
      "include_partial_results": false
    },
    "modified_at": "2023-01-17T14:26:26.619771"
  }
}

Properties

Name Type Optional Description
id string(uuid) false -
event_type string false -
data object false -
created_at string(date-time) false -

WebhookListingEventDTO

Example

1
2
3
4
5
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "event_type": "stt.jobs.completed",
  "created_at": "2019-08-24T14:15:22Z"
}

Properties

Name Type Optional Description
id string(uuid) false -
event_type string false -
created_at string(date-time) false -

WebhookRotationDTO

Example

1
2
3
4
5
6
{
  "rotation_period": {
    "days": 3,
    "hours": 0
  }
}

Properties

Name Type Optional Description
rotation_period WebhookSecretRotationPeriod false "Define the rotation period in which old secret keys are still active.

WebhookSecretDTO

Example

1
2
3
4
5
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "key": "string",
  "expired_at": "2019-08-24T14:15:22Z"
}

Properties

Name Type Optional Description
id string(uuid) false -
key string false -
expired_at string(date-time) true -

WebhookSecretRotationPeriod

"Define the rotation period in which old secret keys are still active.

Example

1
2
3
4
{
  "days": 3,
  "hours": 0
}

Properties

Name Type Optional Description
days integer true -
hours integer true -