# Metadata schemas

There are 2 main schemas that you need to be aware of in otterspace.

* Rafts (latest version: [1.0.0](https://beta.otterspace.xyz/api/schemas/raft/1.0.0.json))
* Badges Specs (latest version: [1.0.](https://beta.otterspace.xyz/api/schemas/badge/1.0.1.json)[1](https://otterspace-api-staging.herokuapp.com/schemas/badge/1.0.1.json))

#### Rafts <a href="#block-d6ac8b5fb0044918ae3af480e890b6d0" id="block-d6ac8b5fb0044918ae3af480e890b6d0"></a>

Communities are expressed as Rafts in Otterspace. They are essentially ERC721 tokens or NFTs. A Raft’s metadta is expressed via the following hosted schema

```json
{
   "$schema":"http://json-schema.org/draft-04/schema#",
   "$id":"https://api.otterspace.xyz/schemas/raft/1.0.0.json",
   "type":"object",
   "properties":{
      "name":{
         "type":"string",
         "description":"The organization name of the Raft"
      },
      "description":{
         "type":"string",
         "description":"Describes the asset to which this Raft NFT represents"
      },
      "image":{
         "type":"string",
         "description":"A URI pointing to a resource with mime type image/* representing the asset to which this Raft NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
      },
      "properties":{
         "type":"object",
         "properties":{
            "parentRaftTokenId":{
               "type":[
                  "integer",
                  "null"
               ],
               "description":"Identifies the parent organization with a Raft token ID."
            },
            "generation":{
               "type":"integer",
               "description":"Identifies the current generation of the Raft."
            }
         },
         "required":[
            "parentRaftTokenId",
            "generation"
         ]
      }
   },
   "required":[
      "name",
      "description",
      "image",
      "properties"
   ]
}
```

#### Badge Specs <a href="#block-3ac479edc73c42289f56c4bf6d62c38f" id="block-3ac479edc73c42289f56c4bf6d62c38f"></a>

A badge spec entity is essentially the design of the badge. Without a badge spec, badges cannot be issued. A badge spec must belong to a Raft and is stored on-chain. The following is the hosted schema that expressed a badge spec

```json
{
   "$schema":"http://json-schema.org/draft-04/schema#",
   "$id":"https://api.otterspace.xyz/schemas/badge/1.0.0.json",
   "type":"object",
   "properties":{
      "name":{
         "type":"string",
         "description":"Identifies the asset to which this Badge represents"
      },
      "description":{
         "type":"string",
         "description":"Describes the asset to which this Badge represents"
      },
      "image":{
         "type":"string",
         "description":"A URI pointing to a resource with mime type image/* representing the asset to which this Badge represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
      },
      "properties":{
         "type":"object",
         "properties":{
            "daoName":{
               "type":"string"
            },
            "raftTokenId":{
               "type":"string",
               "description":"The token ID of the Raft (a community, DAO, etc) that this Badge is associated with."
            },
            "raftContractAddress":{
               "type":"string",
               "description":"The contract address of the associated Raft token."
            },
            "createdByAddress":{
               "type":"string",
               "description":"A timestamp of when this badge was created."
            },
            "expiresAt":{
               "type":[
                  "string",
                  "null"
               ],
               "description":"A timestamp of when this badge would expire. This would be null if this is non-expiring"
            }
         },
         "required":[
            "daoName",
            "raftTokenId",
            "raftContractAddress",
            "createdByAddress",
            "expiresAt"
         ]
      }
   },
   "required":[
      "name",
      "description",
      "image",
      "properties"
   ]
}
```


---

# 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.otterspace.xyz/overview/key-concepts/metadata-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.
