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

# Fetch resource

> This endpoint allows fetching a resource by id.



## OpenAPI

````yaml /api-reference/openapi.yaml get /v1/resources/{id}
openapi: 3.1.0
info:
  title: API Reference
  version: '1.0'
  description: Aira API Reference
  x-logo:
    url: https://static.useaira.com/images/airalogo.svg
    backgroundColor: '#FFFFFF'
    altText: Aira Logo
servers:
  - url: https://api.useaira.com
    description: API base URL
security:
  - ApiKey: []
paths:
  /v1/resources/{id}:
    get:
      tags:
        - Resources
      summary: Fetch resource
      description: This endpoint allows fetching a resource by id.
      parameters:
        - schema:
            type: string
            format: uuid
          in: path
          name: id
          required: true
          description: The unique identifier of the resource in our system.
      responses:
        '200':
          description: Schema representing a resource.
          content:
            application/json:
              schema:
                type: object
                properties:
                  id:
                    description: The unique identifier of the resource in our system.
                    type: string
                    format: uuid
                  name:
                    description: The name of the resource.
                    type: string
                    example: Emails sent
                  type:
                    description: The type of the resource.
                    type: string
                    enum:
                      - unit
                      - currency
                  aggregation:
                    description: The aggregation method used for this resource.
                    type: string
                    enum:
                      - sum
                      - last_during_period
                      - unique
                  aggregateByField:
                    description: >-
                      The aggregateByField property indicates which field will
                      be considered when aggregating events.
                    type: string
                    example: value
                  billingModel:
                    description: The billing model for this resource.
                    type: string
                    enum:
                      - in_full
                      - proration
                  itemId:
                    description: The related item identifier for this resource.
                    type: string
                    format: uuid
                  filters:
                    description: The filters used for this resource.
                    type: array
                    items:
                      type: object
                      properties:
                        property:
                          description: The property of the filter.
                          type: string
                          pattern: ^[a-zA-Z0-9_-]+$
                        value:
                          description: The value of the filter.
                          type: string
                      required:
                        - property
                        - value
                      additionalProperties: false
                    example:
                      - property: eventName
                        value: email_sent
                  archivedAt:
                    description: >-
                      The timestamp when the resource was archived, or null if
                      not archived.
                    type: string
                    format: date-time
                    nullable: true
                required:
                  - id
                  - name
                  - type
                  - aggregation
                  - aggregateByField
                  - billingModel
                  - itemId
                  - filters
                  - archivedAt
                additionalProperties: false
        '404':
          description: Error object returned to the client when a resource is not found.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    description: A human-readable description of the error
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      description: API Key Authentication.
      name: X-API-KEY
      in: header

````