Skip to content

Add Code Snippets and SDKs

page
4 min readUpdated

You can use code examples and client SDK guidance to make your technical documentation easier for developers to adopt. This page explains how to add examples and show developers how to initialize a client in Atloria’s Technical Docs workspace.

Overview

Code snippets help readers understand how to use an API or integration without translating general descriptions into implementation steps on their own. Use examples when you need to demonstrate a request, a response, a configuration value, or a typical integration flow.

Client SDK guidance helps readers start using an SDK consistently. In particular, an Initialize Client section gives developers a clear starting point before they use other operations or examples. Add SDK guidance when your documentation supports one or more client libraries or when setup details are required before a developer can make a first request.

In Atloria, you work with these materials from Technical Docs. You can add examples to improve generated or existing documentation, then review the resulting documentation in the docs view or published documentation view.

📷 Screenshot pending: The Technical Docs workspace showing documentation actions, including Add examples.

Prerequisites

Before you start, make sure that:

  • You can open the relevant project in Atloria.
  • You have access to Technical Docs for the project.
  • You know which API, feature, or workflow the example should explain.
  • You have a safe, representative code sample that does not include production credentials, private keys, or customer data.
  • You know the client initialization details that developers need, such as the required configuration values and authentication approach.
  • You have reviewed the existing documentation so that your example does not duplicate or contradict it.

Step-by-Step Instructions

  1. Open the project that contains the documentation you want to improve.

  2. Select Technical Docs from the project documentation options.

  3. Locate the documentation page or API area where developers need an implementation example.

  4. Select Add examples.

  5. Add an example that demonstrates one focused developer task.

  6. Keep the example aligned with the behavior described in the surrounding documentation.

  7. Include only the values a developer needs to understand the example.

  8. Remove any real credentials, tokens, private URLs, or customer-specific identifiers from the example.

  9. Add explanatory text before or after the example to state when a developer should use it.

  10. Add an Initialize Client example when developers must configure a client before calling the API.

  11. Show the initialization values that readers must provide in the client setup guidance.

  12. Explain any required authentication or environment configuration alongside the initialization guidance.

  13. Review the example and SDK guidance in the documentation view.

  14. Select View Docs to check how the content reads as part of the technical documentation.

  15. Select View Published Docs when you need to verify the reader-facing published experience.

📷 Screenshot pending: A Technical Docs page showing an Initialize Client section and a related code example.

Tips and Best Practices

  • Use one example for one outcome. For example, keep client initialization separate from a later example that performs an operation. This lets readers copy the setup they need without sorting through unrelated code.

  • Start SDK guidance with Initialize Client. Developers should see client setup before examples that depend on an initialized client.

  • Choose realistic placeholder values. A placeholder should make the expected format clear without exposing sensitive information. For example, use a clearly fictional token or endpoint rather than a value copied from a live environment.

  • Explain what a snippet demonstrates. A short sentence such as “Use this example to initialize the client before making API calls” helps readers decide whether the snippet applies to their situation.

  • Keep examples consistent with the technical documentation. If an API name, required value, or documented behavior changes, update the related example and SDK guidance at the same time.

  • Use Add examples to supplement documentation where readers need practical implementation help. Do not add examples simply to repeat information already clear in the API documentation.

  • If documentation has been regenerated, review your examples afterward. You can use Regenerate Docs or ✦ Regenerate AI docs when appropriate, then confirm that your developer guidance remains accurate and visible.

  • Use Search docs... to find existing guidance before adding a new snippet. This helps you avoid maintaining multiple examples for the same setup task.

  • Technical Docs — Work with technical documentation for a project.
  • API Docs — Review API-focused documentation and endpoint guidance.
  • Generate Docs — Generate documentation when project documentation needs to be created or refreshed.
  • View Published Docs — Review the published reader experience.
  • User Manuals — Create end-user instructions for workflows outside technical implementation.

Troubleshooting

The Add examples action is not available

Confirm that you opened Technical Docs for the correct project. If you can view documentation but cannot add content, ask a project administrator to confirm your documentation access.

Developers cannot use the SDK example

Check that the Initialize Client guidance appears before examples that require the client. Verify that required setup details, authentication information, and configuration placeholders are clearly identified.

The example does not appear in published documentation

Open View Docs first to confirm the example is present in the documentation view. Then select View Published Docs to check the published version. If the content was recently regenerated, review the regenerated documentation and add the example again if needed.

Was this page helpful?

Download as PDF
Add Code Snippets and SDKs — Atloria (self dogfood)