diff --git a/.gitbook/assets/api-reference.jpg b/.gitbook/assets/api-reference.jpg new file mode 100644 index 0000000..13440be Binary files /dev/null and b/.gitbook/assets/api-reference.jpg differ diff --git a/.gitbook/assets/hosted.jpg b/.gitbook/assets/hosted.jpg new file mode 100644 index 0000000..d5f275e Binary files /dev/null and b/.gitbook/assets/hosted.jpg differ diff --git a/.gitbook/assets/no-code.jpg b/.gitbook/assets/no-code.jpg new file mode 100644 index 0000000..fdf5421 Binary files /dev/null and b/.gitbook/assets/no-code.jpg differ diff --git a/README.md b/README.md new file mode 100644 index 0000000..41e1620 --- /dev/null +++ b/README.md @@ -0,0 +1,276 @@ +--- +description: Welcome to your team’s developer platform +icon: house +layout: + width: wide + title: + visible: true + description: + visible: true + tableOfContents: + visible: false + outline: + visible: false + pagination: + visible: false + metadata: + visible: false + tags: + visible: true + actions: + visible: true +--- + +# Developer Platform + + + + + + + +

:leaf:

No codeGet started with the developer platform in 5 minutes.Documentationno-code.jpg

:server:

HostedLearn more about hosting the developer platform.Documentationhosted.jpg

:terminal:

API referenceBrowse, test, and implement APIs.API Referenceapi-reference.jpg
+ + + + + +{% columns %} +{% column width="50%" %} +## Get started in minutes + +Make your first API call in under 5 minutes. + +This quickstart walks through the basic setup: create an account, generate an API key, and send a test request. The examples use the same request in several languages, so you can start with the one that matches your stack. + +{% hint style="info" icon="sparkle" %} +**Customize your first request** + +Explain what you're building and let AI tweak your quickstart. + + +{% endhint %} + +{% hint style="warning" icon="life-ring" %} +**Need some help?** + +Troubleshoot common issues or ask for help. + +
+ +I get a 401 Unauthorized error + +Check that your API key is present and valid. + +Make sure you replaced `YOUR_API_KEY` in the example. + +Confirm the `Authorization` header uses `Bearer YOUR_API_KEY`. + +
+ +
+ +I get a 400 Bad Request error + +Check your request body first. + +Make sure the JSON is valid and the `message` field is included. + +Also confirm you send `Content-Type: application/json`. + +
+ +
+ +The request succeeds, but the result is not what I expect + +Start with the sample payload before testing custom input. + +Check the response `status` field to confirm whether the request was only queued. + +If you change the payload shape, verify the endpoint accepts those fields. + +
+ +
+ +My local example does not run + +Check that your runtime and dependencies are installed. + +For JavaScript, install the SDK before running the example. + +For Python, make sure `requests` is available in your environment. + +
+ + +{% endhint %} + +With your first request done, use the guides for deeper setup and the API reference for endpoints and parameters. + +Get started API reference + + + + +{% endcolumn %} + +{% column width="50%" %} +{% stepper %} +{% step %} +#### Create your API key + +Set up your account, then generate an API key for local testing and your first integration. + +Sign upLog in +{% endstep %} + +{% step %} +#### Make your first request + +Pick a language below, replace `YOUR_API_KEY`, and run. + +{% tabs %} +{% tab title="JavaScript" %} +{% code overflow="wrap" %} +```javascript +// Import the SDK +import ExampleAPI from "example-api"; + +// Initialize the client +const client = new ExampleAPI({ apiKey: "YOUR_API_KEY" }); + +// Send your first message +const response = await client.messages.send({ + message: "Hello, world!" +}); +``` +{% endcode %} +{% endtab %} + +{% tab title="Python" %} +{% code overflow="wrap" %} +```python +import requests + +response = requests.post( + "https://api.example.com/messages", + headers={ + "Authorization": "Bearer YOUR_API_KEY", + "Content-Type": "application/json", + }, + json={ + "message": "Hello, world!" + }, +) + +print(response.json()) +``` +{% endcode %} +{% endtab %} + +{% tab title="cURL" %} +{% code overflow="wrap" %} +```bash +curl -X POST https://api.example.com/messages \ + -H "Authorization: Bearer YOUR_API_KEY" \ + -H "Content-Type: application/json" \ + -d '{ + "message": "Hello, world!" + }' +``` +{% endcode %} +{% endtab %} + +{% tab title="Go" %} +{% code overflow="wrap" expandable="true" %} +```go +package main + +import ( + "bytes" + "fmt" + "io" + "net/http" +) + +func main() { + body := []byte(`{"message":"Hello, world!"}`) + + req, err := http.NewRequest("POST", "https://api.example.com/messages", bytes.NewBuffer(body)) + if err != nil { + panic(err) + } + + req.Header.Set("Authorization", "Bearer YOUR_API_KEY") + req.Header.Set("Content-Type", "application/json") + + resp, err := http.DefaultClient.Do(req) + if err != nil { + panic(err) + } + defer resp.Body.Close() + + responseBody, err := io.ReadAll(resp.Body) + if err != nil { + panic(err) + } + + fmt.Println(string(responseBody)) +} +``` +{% endcode %} +{% endtab %} +{% endtabs %} +{% endstep %} + +{% step %} +#### Parse the response + +If the request succeeds, you should get a response like this: + +{% code title="response.json" overflow="wrap" %} +```json +{ + "id": "msg_1234567890", + "message": "Hello, world!", + "status": "queued", + "createdAt": "2026-01-01T12:00:00Z" +} +``` +{% endcode %} +{% endstep %} +{% endstepper %} +{% endcolumn %} +{% endcolumns %} + + + + + +{% columns %} +{% column width="50%" %} +
+{% endcolumn %} + +{% column width="50%" valign="middle" %} +## Learn more about the developer platform + +Read guides, watch tutorials, and learn more about working with the developer platform and integrating it with your own stack. + +Guides Documentation +{% endcolumn %} +{% endcolumns %} + + + + + +

Join a community of over 3,000 developers

+ +

Join our Discord community or create your first PR in just a few steps.

+ +

:discord:

Discord communityJoin our Discord community to post questions, get help, and share resources with over 3,000 like-minded developers.Join Discordhttps://www.gitbook.com/

:github:

GitHubOur product is 100% open source and built by developers just like you. Head to our GitHub repository to learn how to submit your first PR.Submit a PRhttps://www.gitbook.com/
+ + diff --git a/SUMMARY.md b/SUMMARY.md new file mode 100644 index 0000000..d338256 --- /dev/null +++ b/SUMMARY.md @@ -0,0 +1,3 @@ +# Table of contents + +* [Developer Platform](README.md)