WattTime Authentication API

Register for an account and obtain access tokens.

Operations 2

POST /register WattTime Register New Account #
GET /login WattTime Login and Obtain Access Token #

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/watttime-authentication-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

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. See our Privacy Policy and Terms.

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

OpenAPI Specification

watttime-authentication-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: WattTime Account Authentication API
  description: The WattTime Data API v3 provides access to real-time, forecast, and historical marginal emissions data for electric grids worldwide. Key signals include CO2 MOER (Marginal Operating Emissions Rate), health damage estimates, and CO2 AOER (Average Operating Emissions Rate). Coverage spans 342 grid regions in 210 countries and territories, with real-time data updated every five minutes. Authentication uses JWT bearer tokens obtained via the login endpoint using HTTP Basic Auth.
  version: '3.0'
  contact:
    name: WattTime Support
    email: support@watttime.org
    url: https://watttime.org/
  license:
    name: Proprietary
    url: https://watttime.org/data-plans/
  x-generated-from: documentation
servers:
- url: https://api.watttime.org/v3
  description: WattTime API v3 Production
- url: https://api2.watttime.org/v2
  description: WattTime API v2 Legacy
tags:
- name: Authentication
  description: Register for an account and obtain access tokens.
paths:
  /register:
    post:
      operationId: register
      summary: WattTime Register New Account
      description: Create a new WattTime API account. Registration requires a username, password, email, and organization. After registration, use the login endpoint to obtain an access token.
      tags:
      - Authentication
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RegisterRequest'
            examples:
              RegisterRequestExample:
                summary: Default register request
                x-microcks-default: true
                value:
                  username: johndoe
                  password: securepassword123
                  email: johndoe@example.com
                  org: Example Organization
      responses:
        '201':
          description: Account created successfully.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RegisterResponse'
              examples:
                Register201Example:
                  summary: Default register 201 response
                  x-microcks-default: true
                  value:
                    user: johndoe
                    ok: User created
        '400':
          description: Bad request - missing or invalid fields.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
  /login:
    get:
      operationId: login
      summary: WattTime Login and Obtain Access Token
      description: Authenticate using HTTP Basic Auth (username and password) to obtain a JWT bearer token. The token expires after 30 minutes and must be included as an Authorization Bearer header on all subsequent API calls. If a data call returns HTTP 401, re-authenticate to get a new token.
      tags:
      - Authentication
      security:
      - basicAuth: []
      responses:
        '200':
          description: Authentication successful. Returns a JWT token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LoginResponse'
              examples:
                Login200Example:
                  summary: Default login 200 response
                  x-microcks-default: true
                  value:
                    token: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.example
        '401':
          description: Invalid credentials.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    ErrorResponse:
      type: object
      properties:
        error:
          type: string
          description: Error type or code.
          example: unauthorized
        message:
          type: string
          description: Human-readable error message.
          example: Invalid or expired token. Please re-authenticate.
        detail:
          type: string
          description: Additional error detail.
          example: Token has expired. Please call /login to get a new token.
    RegisterResponse:
      type: object
      properties:
        user:
          type: string
          description: Created username.
          example: johndoe
        ok:
          type: string
          description: Success message.
          example: User created
    LoginResponse:
      type: object
      properties:
        token:
          type: string
          description: JWT bearer token for subsequent API requests. Expires after 30 minutes.
          example: eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.example
    RegisterRequest:
      type: object
      required:
      - username
      - password
      - email
      - org
      properties:
        username:
          type: string
          description: Desired username for the new account.
          example: johndoe
        password:
          type: string
          description: Password for the new account.
          example: securepassword123
        email:
          type: string
          format: email
          description: Email address for the new account.
          example: johndoe@example.com
        org:
          type: string
          description: Organization or company name.
          example: Example Organization
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: HTTP Basic Authentication used only for the /login endpoint. Provide username and password to obtain a bearer token.
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: 'JWT bearer token obtained from the /login endpoint. Token expires after 30 minutes. Include as Authorization: Bearer {token} header.'