# Schemas

### Single Schema

```typescript
POST / graphql;
```

Retrieve the data of a schema by querying with a schema ID.

Body Parameters:

```graphql
# Write your query or mutation here
query getSchema {
  schema(id: "onchain_evm_80001_0x3") {
    id
    mode
    chainType
    chainId
    schemaId
    transactionHash
    name
    description
    revocable
    maxValidFor
    resolver
    registerTimestamp
    registrant
    data
  }
}
```

Response:

```json
{
  "data": {
    "schema": {
      "id": "onchain_evm_80001_0x3",
      "mode": "onchain",
      "chainType": "evm",
      "chainId": "80001",
      "schemaId": "0x3",
      "transactionHash": "0x73a6b43255ada4b165b55477f34fa4baa44d9090e6ecb6a145274e15ae0865b6",
      "name": "message",
      "description": "",
      "revocable": true,
      "maxValidFor": 0,
      "resolver": "0x0000000000000000000000000000000000000000",
      "registerTimestamp": 1705484022,
      "registrant": "0x9854E76134e6D729A633CED51042fF653f04f4C5",
      "data": "[{\"name\":\"message\",\"type\":\"string\"}]"
    }
  }
}
```

### Filtered Schemas

```typescript
POST / graphql;
```

Query for a list of schemas. Results can be filtered, paginated, ordered, etc. according to GraphQL standards.

Body Parameters:

```graphql
query querySchemas {
  pagedSchemas(page: 1, size: 10) {
    total
    page
    size
    schemas {
      id
      mode
      chainType
      chainId
      schemaId
      transactionHash
      name
      description
      revocable
      maxValidFor
      resolver
      registerTimestamp
      registrant
      data
    }
  }
}
```

Response:

```json
{
    "data": {
        "pagedSchemas": {
            "total": 20,
            "page": 1,
            "size": 10,
            "schemas": [
                {
                    "id": "onchain_evm_7001_0x7",
                    "mode": "onchain",
                    "chainType": "evm",
                    "chainId": "7001",
                    "schemaId": "0x7",
                    "transactionHash": "0xabddd6fe182a75d61eb0feef028a71a24fbdf46e7508c519c099c9d8a5805801",
                    "name": "test",
                    "description": "whasa",
                    "revocable": true,
                    "maxValidFor": 0,
                    "resolver": "0x0000000000000000000000000000000000000000",
                    "registerTimestamp": 1705912991,
                    "registrant": "0xDfc4FbbDd9C47c7976fEBb14B1D37C7f85FE299D",
                    "data": "[{\"name\":\"name\",\"type\":\"string\"},{\"name\":\"count\",\"type\":\"number\"}]"
                },
                ...
            ]
        }
    }
}
```


---

# Agent Instructions: 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.sign.global/for-builders/index/index-2/schemas.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.
