> ## Documentation Index
> Fetch the complete documentation index at: https://docs.snagsolutions.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Get contracts

> Get contracts



## OpenAPI

````yaml /api-reference/openapi.documented.json get /api/contracts
openapi: 3.0.2
info:
  title: Snag Solutions - API Docs
  description: >-
    Documentation for Loyalty & Socials APIs. Some endpoints require an API key
    to authenticate. To obtain a key, reach out to the Snag Solutions team at
    support@snagsolutions.io.
  version: '0.1'
servers:
  - url: https://admin.snagsolutions.io/
    description: Production
security: []
paths:
  /api/contracts:
    get:
      tags:
        - Contract
      summary: Get contracts
      description: Get contracts
      parameters:
        - name: search
          in: query
          schema:
            type: string
        - name: organizationId
          in: query
          required: true
          schema:
            type: string
            format: uuid
        - name: websiteId
          in: query
          required: true
          schema:
            type: string
            format: uuid
        - name: cursor
          in: query
          schema:
            type: string
        - name: includeAbi
          in: query
          schema:
            default: true
            type: boolean
        - name: id
          in: query
          schema:
            type: string
            format: uuid
        - name: limit
          in: query
          description: Number of contracts to return
          schema:
            default: 10
            type: integer
            minimum: 1
            maximum: 1000
            title: Limit
            example: 10
        - name: startingAfter
          in: query
          description: Pagination cursor to start after a specific contract ID
          schema:
            type: string
            format: uuid
            title: Starting After
            example: 123e4567-e89b-12d3-a456-426614174100
      responses:
        '200':
          description: '200'
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: array
                    items:
                      type: object
                      properties:
                        id:
                          type: string
                          format: uuid
                          title: ID
                          description: Unique identifier for the contract
                          example: 123e4567-e89b-12d3-a456-426614174003
                        name:
                          type: string
                          maxLength: 40
                          nullable: true
                          title: Name
                          description: Name of the contract
                          example: My Contract
                        address:
                          type: string
                          pattern: ^0x[a-fA-F0-9]{40}$
                          title: Address
                          description: Contract address matching the required format
                          example: 0xabc123...
                        chainId:
                          type: integer
                          format: int64
                          title: Chain ID
                          description: ID of the blockchain chain
                          example: 1
                        abi:
                          nullable: true
                          title: ABI
                          description: Application Binary Interface of the contract
                          example: '[{ "constant": true, ... }]'
                        type:
                          type: string
                          enum:
                            - erc20
                            - erc721
                            - erc1155
                            - custom
                          title: Type
                          description: Type of the contract
                          example: ERC721
                        organizationId:
                          type: string
                          format: uuid
                          title: Organization ID
                          description: Unique identifier for the organization
                          example: 123e4567-e89b-12d3-a456-426614174002
                        iconUrl:
                          type: string
                          format: uri
                          nullable: true
                          title: Icon URL
                          description: >-
                            Optional icon image for the contract; used as the
                            reward token icon
                          example: https://cdn.example.com/contract-icon.png
                      required:
                        - id
                        - name
                        - address
                        - chainId
                        - type
                        - organizationId
                      title: Contract Schema
                      description: Schema for a contract
                  hasNextPage:
                    type: boolean
                required:
                  - data
                  - hasNextPage
      security:
        - apiKeyAuth: []
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````