Skip to content

Commit 1754310

Browse files
author
Thomas Gilbert
committed
Merge branch 'thomas/direct-destination' of github.com:segmentio/segment-docs into thomas/direct-destination
2 parents 963ef7a + 555f9df commit 1754310

File tree

2 files changed

+9
-179
lines changed

2 files changed

+9
-179
lines changed

Gemfile.lock

Lines changed: 0 additions & 170 deletions
This file was deleted.

src/partners/direct-destination.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ title: Building a Direct Destination
33
redirect_from: '/partners/build-webhook/'
44
---
55

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.
77

8-
## Getting Started
8+
## Getting started
99

1010
Review the steps outlined in the [Developer Center Overview](/docs/partners). This document outlines specific details for building a direct webhook destination.
1111

@@ -46,7 +46,7 @@ This would result in a final string of `'Basic c2VnbWVudDo='`. This is what is c
4646

4747
See the [headers](#headers) section for more details.
4848

49-
#### Custom Settings
49+
#### Custom settings
5050
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.)
5151

5252

@@ -66,7 +66,7 @@ Segment sends you the following HTTP headers with all requests:
6666
| `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==` |
6767

6868

69-
#### Request Body
69+
#### Request body
7070

7171
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:
7272

@@ -103,7 +103,7 @@ For example, you might implement the `.identify(userId, traits)` call to create
103103
> The casing on these fields will vary by customer, so be ready to accept any casing.
104104
105105

106-
#### Status Code
106+
#### Status code
107107

108108
Segment uses standard HTTP status code conventions to help diagnose problems quickly and give better insight into how the destination is working.
109109

@@ -120,7 +120,7 @@ Upon receiving data, your endpoint should reply with one of the following status
120120
| `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). |
121121
| `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. |
122122

123-
#### Response Body
123+
#### Response body
124124

125125
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.
126126

@@ -148,17 +148,17 @@ When testing your integration, proceed through two separate flows:
148148
1. Test that your endpoint successfully ingests data in the way you would expect.
149149
2. Mimic a user implementing your integration within their Segment workspace.
150150

151-
### Your Endpoint
151+
### Your endpoint
152152

153153
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.
154154

155155

156156
In the debugger panel, check the two outputs. The **Request from Segment** and the **Response from destination**.
157157

158-
* **Request from Segment** - What we posted to your endpoint
158+
* **Request from Segment** - What Segment posted to your endpoint
159159
* **Response from destination** - How your server responded
160160

161-
### The User Flow
161+
### The user flow
162162

163163
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.
164164

0 commit comments

Comments
 (0)