Normatia Cuenta API

La clave, su organización, el consumo y las claves.

GitHub OpenAPI

Operations 4

GET /v1/keys Tus claves en esta organización #
DELETE /v1/keys/{key_id} Revocar una clave #
GET /v1/me La clave, su organización y sus límites #
GET /v1/usage Consumo de la organización #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/normatia-com:normatia-com-cuenta-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

normatia-com-cuenta-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Normatia Cuenta API
  version: 1.0.0
  description: 'API de normativa de edificación española: el catálogo normativo, la normativa que aplica a cada territorio, el contexto de tus proyectos y consultas en lenguaje natural con sus fuentes. La documentación completa está en https://docs.normatia.com.'
  contact:
    name: Normatia
    email: hola@normatia.com
    url: https://docs.normatia.com
servers:
- url: https://api.normatia.com
  description: Producción
security:
- claveApi: []
tags:
- name: Cuenta
  description: La clave, su organización, el consumo y las claves.
paths:
  /v1/keys:
    get:
      tags:
      - Cuenta
      summary: Tus claves en esta organización
      description: Las claves del usuario de la clave en su organización, activas y revocadas, sin la clave completa (Normatia solo guarda su huella). Las de otros miembros no aparecen.
      operationId: listKeys
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KeyListResponse'
        '401':
          description: Falta la clave, no es válida o está revocada.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: La organización de la clave no tiene activada la API, o la clave no tiene el permiso de la ruta (insufficient_scope).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Límite por minuto superado (con Retry-After) o cupo del mes agotado.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Error interno. Indica el X-Request-Id si escribes a soporte.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/keys/{key_id}:
    delete:
      tags:
      - Cuenta
      summary: Revocar una clave
      description: 'Revoca una clave del usuario en esta organización, también la que hace la petición. Deja de funcionar en menos de un minuto en todas las rutas y en el servidor MCP. No se puede deshacer: para seguir, crea otra en Mi cuenta > Claves API. Una clave de prueba o con permisos limitados solo puede revocarse a sí misma.'
      operationId: revokeKey
      parameters:
      - name: key_id
        in: path
        required: true
        schema:
          type: string
          title: Key Id
      responses:
        '204':
          description: Successful Response
        '422':
          description: Datos no válidos.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Falta la clave, no es válida o está revocada.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: La organización de la clave no tiene activada la API, o la clave no tiene el permiso de la ruta (insufficient_scope).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Límite por minuto superado (con Retry-After) o cupo del mes agotado.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Error interno. Indica el X-Request-Id si escribes a soporte.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/me:
    get:
      tags:
      - Cuenta
      summary: La clave, su organización y sus límites
      description: Comprueba que la clave funciona y devuelve de qué organización es, qué tiene activado (API y MCP), sus límites por minuto y cuántas consultas le quedan este mes.
      operationId: getMe
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MeResponse'
        '401':
          description: Falta la clave, no es válida o está revocada.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: La organización de la clave no tiene activada la API, o la clave no tiene el permiso de la ruta (insufficient_scope).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Límite por minuto superado (con Retry-After) o cupo del mes agotado.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Error interno. Indica el X-Request-Id si escribes a soporte.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
  /v1/usage:
    get:
      tags:
      - Cuenta
      summary: Consumo de la organización
      description: Las llamadas y los créditos de la organización de la clave entre dos fechas (en UTC, ambas incluidas), por ruta y por día, con la parte de esta clave y el cupo que queda. Por defecto, el mes en curso. Como mucho, 92 días por petición.
      operationId: getUsage
      parameters:
      - name: from
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          description: Primer día, AAAA-MM-DD. Por defecto, el 1 del mes.
          title: From
        description: Primer día, AAAA-MM-DD. Por defecto, el 1 del mes.
      - name: to
        in: query
        required: false
        schema:
          anyOf:
          - type: string
            format: date
          - type: 'null'
          description: Último día, AAAA-MM-DD. Por defecto, hoy.
          title: To
        description: Último día, AAAA-MM-DD. Por defecto, hoy.
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UsageResponse'
        '422':
          description: Datos no válidos.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '401':
          description: Falta la clave, no es válida o está revocada.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '403':
          description: La organización de la clave no tiene activada la API, o la clave no tiene el permiso de la ruta (insufficient_scope).
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '429':
          description: Límite por minuto superado (con Retry-After) o cupo del mes agotado.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
        '500':
          description: Error interno. Indica el X-Request-Id si escribes a soporte.
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Problem'
components:
  schemas:
    UsageRow:
      properties:
        calls:
          type: integer
          title: Calls
        credits:
          type: integer
          title: Credits
        errors:
          type: integer
          title: Errors
          description: Llamadas que acabaron en un estado 4xx o 5xx.
      type: object
      required:
      - calls
      - credits
      - errors
      title: UsageRow
    UsageByDay:
      properties:
        calls:
          type: integer
          title: Calls
        credits:
          type: integer
          title: Credits
        errors:
          type: integer
          title: Errors
          description: Llamadas que acabaron en un estado 4xx o 5xx.
        date:
          type: string
          format: date
          title: Date
      type: object
      required:
      - calls
      - credits
      - errors
      - date
      title: UsageByDay
    KeyInfo:
      properties:
        id:
          type: string
          title: Id
        mode:
          type: string
          enum:
          - live
          - test
          title: Mode
          description: 'test: una clave de prueba, que solo responde con el entorno de pruebas.'
          default: live
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
          description: El nombre que se le dio al crearla.
        hint:
          type: string
          title: Hint
          description: Los últimos caracteres de la clave, para reconocerla.
        scopes:
          items:
            type: string
            enum:
            - data
            - ask
            - mcp
          type: array
          title: Scopes
          description: 'Lo que puede hacer la clave: data (parcelas, municipios, normativa y proyectos; no gasta), ask (consultas y comprobaciones; gastan cupo) y mcp (el servidor MCP). Una de prueba, solo data.'
        created_at:
          type: string
          format: date-time
          title: Created At
        last_used_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Used At
      type: object
      required:
      - id
      - hint
      - created_at
      title: KeyInfo
    MeResponse:
      properties:
        key:
          $ref: '#/components/schemas/KeyInfo'
        user:
          $ref: '#/components/schemas/UserInfo'
        organization:
          anyOf:
          - $ref: '#/components/schemas/OrganizationInfo'
          - type: 'null'
          description: La organización de la clave. Null si el usuario ya no es miembro de ella.
        rate_limits:
          $ref: '#/components/schemas/RateLimits'
        quota:
          $ref: '#/components/schemas/Quota'
      type: object
      required:
      - key
      - user
      - rate_limits
      - quota
      title: MeResponse
    KeyListItem:
      properties:
        id:
          type: string
          title: Id
        mode:
          type: string
          enum:
          - live
          - test
          title: Mode
          default: live
        name:
          anyOf:
          - type: string
          - type: 'null'
          title: Name
        hint:
          type: string
          title: Hint
          description: Los últimos caracteres de la clave.
        scopes:
          items:
            type: string
            enum:
            - data
            - ask
            - mcp
          type: array
          title: Scopes
          description: 'Lo que puede hacer la clave: data (parcelas, municipios, normativa y proyectos; no gasta), ask (consultas y comprobaciones; gastan cupo) y mcp (el servidor MCP). Una de prueba, solo data.'
        status:
          type: string
          enum:
          - active
          - revoked
          title: Status
        created_at:
          type: string
          format: date-time
          title: Created At
        last_used_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Last Used At
        revoked_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Revoked At
        current:
          type: boolean
          title: Current
          description: Si es la clave con la que se hace esta petición.
      type: object
      required:
      - id
      - hint
      - status
      - created_at
      - current
      title: KeyListItem
    UsageResponse:
      properties:
        scope:
          type: string
          enum:
          - organization
          - key
          title: Scope
          description: 'De quién son las cifras: de toda la organización de la clave o solo de esta clave.'
        organization_id:
          anyOf:
          - type: string
          - type: 'null'
          title: Organization Id
        from:
          type: string
          format: date
          title: From
        to:
          type: string
          format: date
          title: To
        totals:
          $ref: '#/components/schemas/UsageRow'
        by_endpoint:
          items:
            $ref: '#/components/schemas/UsageByEndpoint'
          type: array
          title: By Endpoint
        by_day:
          items:
            $ref: '#/components/schemas/UsageByDay'
          type: array
          title: By Day
        this_key:
          $ref: '#/components/schemas/UsageRow'
          description: La parte de esta clave.
        quota:
          $ref: '#/components/schemas/Quota'
      type: object
      required:
      - scope
      - from
      - to
      - totals
      - by_endpoint
      - by_day
      - this_key
      - quota
      title: UsageResponse
    UserInfo:
      properties:
        id:
          type: string
          title: Id
        email:
          anyOf:
          - type: string
          - type: 'null'
          title: Email
      type: object
      required:
      - id
      title: UserInfo
    UsageByEndpoint:
      properties:
        calls:
          type: integer
          title: Calls
        credits:
          type: integer
          title: Credits
        errors:
          type: integer
          title: Errors
          description: Llamadas que acabaron en un estado 4xx o 5xx.
        endpoint:
          type: string
          title: Endpoint
      type: object
      required:
      - calls
      - credits
      - errors
      - endpoint
      title: UsageByEndpoint
    RateLimits:
      properties:
        data_per_minute:
          type: integer
          title: Data Per Minute
          description: 'Rutas de datos: normativa, localización, proyectos y cuenta.'
        intelligence_per_minute:
          type: integer
          title: Intelligence Per Minute
          description: Consultas y comprobaciones (ask, verify).
        mcp_per_minute:
          type: integer
          title: Mcp Per Minute
          description: Peticiones al servidor MCP.
      type: object
      required:
      - data_per_minute
      - intelligence_per_minute
      - mcp_per_minute
      title: RateLimits
    OrganizationInfo:
      properties:
        id:
          type: string
          title: Id
        name:
          type: string
          title: Name
        plan:
          type: string
          title: Plan
        api_enabled:
          type: boolean
          title: Api Enabled
        mcp_enabled:
          type: boolean
          title: Mcp Enabled
      type: object
      required:
      - id
      - name
      - plan
      - api_enabled
      - mcp_enabled
      title: OrganizationInfo
    Problem:
      type: object
      description: Error en formato RFC 9457 (rutas /v1). `code` es lo que debe mirar un programa.
      required:
      - type
      - title
      - status
      - detail
      - code
      properties:
        type:
          type: string
          format: uri
          example: https://docs.normatia.com/api-reference/errores/#api_not_enabled
        title:
          type: string
          example: Sin acceso
        status:
          type: integer
          example: 403
        detail:
          type: string
          example: Tu organización no tiene activado el acceso por API.
        code:
          type: string
          example: api_not_enabled
        request_id:
          type: string
          example: req_4f0c2a9e6b1d4c3e8a7f5b2d1e0c9a8b
      additionalProperties: true
    Quota:
      properties:
        unlimited:
          type: boolean
          title: Unlimited
          description: Si las consultas de la organización no tienen tope mensual.
        remaining:
          anyOf:
          - type: integer
          - type: 'null'
          title: Remaining
          description: Consultas que quedan este mes. Sin tope, null.
        resets_at:
          anyOf:
          - type: string
            format: date-time
          - type: 'null'
          title: Resets At
          description: Cuándo se reinicia el cupo.
      type: object
      required:
      - unlimited
      title: Quota
    KeyListResponse:
      properties:
        keys:
          items:
            $ref: '#/components/schemas/KeyListItem'
          type: array
          title: Keys
      type: object
      required:
      - keys
      title: KeyListResponse
  securitySchemes:
    claveApi:
      type: http
      scheme: bearer
      description: 'La clave de API de tu organización: `Authorization: Bearer sk-normatia-...`. Se crea en normatia.com, Mi cuenta > Claves API.'