You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/partners/direct-destination.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,9 +3,9 @@ title: Building a Direct Destination
3
3
redirect_from: '/partners/build-webhook/'
4
4
---
5
5
6
-
Direct Destinations allow Segment Partners to ingest Segment Event Data using a just webhook. This guide explains how to set up your webhook with Segment.
6
+
Direct Destinations allow Segment Partners to ingest Segment Event Data using just a webhook. This guide explains how to set up your webhook with Segment.
7
7
8
-
## Getting Started
8
+
## Getting started
9
9
10
10
Review the steps outlined in the [Developer Center Overview](/docs/partners). This document outlines specific details for building a direct webhook destination.
11
11
@@ -46,7 +46,7 @@ This would result in a final string of `'Basic c2VnbWVudDo='`. This is what is c
46
46
47
47
See the [headers](#headers) section for more details.
48
48
49
-
#### Custom Settings
49
+
#### Custom settings
50
50
All direct destinations have an API key setting by default, which Segment will send in the Authorization Header. To add more custom settings, go to the `Settings Editor` page. Any custom settings you add will be sent in the custom header `X-Segment-Settings` (See the [headers](#headers) section for more details.)
51
51
52
52
@@ -66,7 +66,7 @@ Segment sends you the following HTTP headers with all requests:
66
66
|`X-Segment-Settings`| Except for the API key (which is sent in the Authorization header), Segment will send the base 64 encoding of the rest of your custom settings encoded in this header. |`X-Segment-Settings: eyJjdXN0b21TZXR0aW5nT25lIjoiY3VzdG9tIHNldHRpbmcgdmFsdWUifQ==`|
67
67
68
68
69
-
#### Request Body
69
+
#### Request body
70
70
71
71
Segment's [Spec](/docs/connections/spec) standardizes the data that you can expect from Segment. You can choose to implement four types types of calls:
72
72
@@ -103,7 +103,7 @@ For example, you might implement the `.identify(userId, traits)` call to create
103
103
> The casing on these fields will vary by customer, so be ready to accept any casing.
104
104
105
105
106
-
#### Status Code
106
+
#### Status code
107
107
108
108
Segment uses standard HTTP status code conventions to help diagnose problems quickly and give better insight into how the destination is working.
109
109
@@ -120,7 +120,7 @@ Upon receiving data, your endpoint should reply with one of the following status
120
120
|`501`| If Segment sends you an [API call type](https://segment.com/docs/connections/spec/#api-calls) (indicated by the `type` property included on all messages) you don't support, reply with this code. Read more about the API call types Segment supports [here](https://segment.com/docs/connections/spec/#api-calls). |
121
121
|`503`| Send Segment this code when your endpoint is temporarily down for maintenance or otherwise not accepting messages. This helps Segment avoid dropping users' messages during your downtime. |
122
122
123
-
#### Response Body
123
+
#### Response body
124
124
125
125
You can normally send back an empty body, but when sending back a `4xx`- or `5xx`-class error, you can optionally send Segment a diagnostic message that explains the error. This message is displayed to the user in the Segment debugger, and is be used in Segment's Event Delivery summaries.
126
126
@@ -148,17 +148,17 @@ When testing your integration, proceed through two separate flows:
148
148
1. Test that your endpoint successfully ingests data in the way you would expect.
149
149
2. Mimic a user implementing your integration within their Segment workspace.
150
150
151
-
### Your Endpoint
151
+
### Your endpoint
152
152
153
153
Test your code directly from the Developer Portal UI. Use the `Send Test Events` tab and review the test events to make sure your destination works as expected.
154
154
155
155
156
156
In the debugger panel, check the two outputs. The **Request from Segment** and the **Response from destination**.
157
157
158
-
***Request from Segment** - What we posted to your endpoint
158
+
***Request from Segment** - What Segment posted to your endpoint
159
159
***Response from destination** - How your server responded
160
160
161
-
### The User Flow
161
+
### The user flow
162
162
163
163
The ultimate goal is for Partners like yourself to create and publish high quality Destinations in [the Segment Catalog](https://segment.com/catalog/). Your Segment account doubles as a sandbox account to test your destination while you are still in a private "building" state.
0 commit comments