> For the complete documentation index, see [llms.txt](https://synap.ac/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://synap.ac/docs/api/getting-started.md).

# Getting Started

Documentation is currently under development. Please get in touch if you need details for endpoints that are not yet fully documented. :::

> This documentation covers the Synap API endpoints and use-cases.

Looking for our legacy "Org API" documentation? Please [click here](https://docs.synap.ac/).

Looking to extend or customise your organisation's Synap platform experience? You've found the right place. Please read on.

### API Design

The Synap API is built upon two well-known industry standards:

* OpenAPI v3: [Specification](https://swagger.io/specification/)
* JSON:API v1.1: [Specification](https://jsonapi.org/format/)

You do not need to be familiar with either of these standards to begin building with the Synap API. However, any client libraries you wish to use to interact with the API can safely assume that the requests and responses will adhere to these standards.

### First Request

You do not need an organisation-level "secret" API Key to access the Synap API. Instead, we have opted for a self-managed token approach called Personal Access Tokens (PATs). Once obtained, you add this to each request as an `Authorization: Bearer <token>`. Read the [Authentication](https://api-docs.synap.ac/authentication-634225m0.md) guide to learn more.

Once you have obtained a PAT, here is a simple CURL request that you can try:

```bash
curl 'https://api.synap.ac/v3/portals/current' \
    --header 'Authorization: Bearer <PAT>'
```

If you see some data related to your organisation's Portal, the request was successful:

```json
{ "data": {"type":"Portal", "id":"...", "attributes": { ... }} }
```

Otherwise, if your PAT was invalid or misconfigured, you may see the following:

```json
{ "errors": [{"status":"404","title":"...","detail":"..." }] }
```

### Testing

You may wish to build your integration against our "Staging" API. However, as this API will be unable to access your organisation's "live" data, we must first setup a staging environment for you. This is currently only available to our Enterprise customers. Please get in touch if your organisation needs this functionality.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://synap.ac/docs/api/getting-started.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
