> For the complete documentation index, see [llms.txt](https://docs.bitcoinos.build/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.bitcoinos.build/technical-documentation/grail-pro-charms-zkbtc/technical-overview/grail-pro/grail-pro-institutional-integration/backend-api-integration.md).

# Backend API Integration

Authentication: Obtain a JWT token via a secure login service to identify the user.  The token is used to identify the user to the back-end.

Key APIs:

#### Transaction API Requests

POST /api/v1/peg-in\
Request body:&#x20;

{\
&#x20; "wallet\_address": "\<user\_wallet\_address>",\
&#x20; "amount": "\<amount>",\
&#x20; "recovery\_key": "\<recovery\_key>",\
&#x20; "transaction\_type": "peg-in"\
}

**Response body:**

{\
&#x20; "status": "success",\
&#x20; "taproot\_address": "\<taproot\_address>"\
}

#### Cosigner State API Request

GET /api/v1/cosigners/state

**Response:**

{\
&#x20; "cosigners": \[\
&#x20;   {\
&#x20;     "public\_key": "\<public\_key>",\
&#x20;     "attestation": "\<attestation\_document>"\
&#x20;   }\
&#x20; ],\
&#x20; "aggregation\_strategy": "\<strategy\_description>"\
}

<br>


---

# 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:

```
GET https://docs.bitcoinos.build/technical-documentation/grail-pro-charms-zkbtc/technical-overview/grail-pro/grail-pro-institutional-integration/backend-api-integration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
