> For the complete documentation index, see [llms.txt](https://docs.zetrix.com/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zetrix.com/en/developer-resources/blockchain-as-a-services-baas/zetrix-service.md).

# Zetrix Service

A Zetrix BaaS API allows developers to interact with the underlying blockchain network and utilize its features and functionality through a standardized interface. Some common capabilities provided by a BaaS API include:

1. **Blockchain Account Management:** APIs to create, configure, and manage account API provides programmatic access on a blockchain network.
2. **Smart Contract Deployment and Execution**: APIs to deploy smart contracts to the blockchain network and invoke their functions. This includes functions for compiling, deploying, and interacting with smart contracts.
3. **Crosschain Blockchain** APIs: Typically use a set of methods to interact with smart contracts and other systems across different blockchain networks.
4. **Transaction and Data Management:** APIs for creating, signing, and submitting transactions to the blockchain network. They may also provide functionality for querying transaction status, retrieving transaction history, and managing data on the blockchain.
5. **Verifiable Credential :** APIs for managing user identities, permissions, and access controls on the blockchain network. Zetrix Verifiable Credential Certs and its API allow you to generate and digitally sign Verifiable Credentials.

The **endpoints for Zetrix BaaS API** for both mainnet and testnet are defined as

1. <https://api-sandbox.zetrix.com> (Zetrix Testnet)
2. <https://api-v2.zetrix.com> (Zetrix Mainnet)

Access to BaaS services requires users to register an account on [ZPlatform](/en/developer-resources/zplatform-baas-api.md).

#### Authorization

All API requests must include **both** the API Gateway key and the access token:

* **API Gateway Key:** Include in the header `X-API-Key`.
* **Access Token:** Include in the header `Authorization: Bearer <access_token>`.

#### Access Token

```http
Authorization : Bearer <ACCESS_TOKEN>
```

#### API Gateway Authentication

All requests to the Zetrix API Gateway **must** include the following header:

**Testnet**

```http
X-API-Key:ehg7q2i6aN8jY6BbHqN5q42KsHQFRwl260jqAkAU
```

**Mainnet**

```http
X-API-Key:OOXtr6biOR6eJa2Rjj9En4PwDxxl0U2haUohaxrC
```

**Example (curl)**

```bash
curl -X GET https://<api-endpoint> \
  -H "X-API-Key: ehg7q2i6aN8jY6BbHqN5q42KsHQFRwl260jqAkAU" \
  -H "Authorization: Bearer <your_access_token>" \
  -H "Content-Type: application/json"
```

**Notes**

* The `X-API-Key` header is **required** for all API Gateway requests.
* Requests without a valid API key will be rejected with an authorization error.


---

# 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://docs.zetrix.com/en/developer-resources/blockchain-as-a-services-baas/zetrix-service.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.
