openapi: 3.1.0 info: title: Utility Accounting Authorizations API description: UtilityAPI provides a REST API for collecting, standardizing, and sharing utility data including meters, bills, intervals, authorizations, and webhook events. Supports the Green Button standard for energy data sharing. version: '2' contact: name: UtilityAPI Support url: https://utilityapi.com/contact termsOfService: https://utilityapi.com/terms servers: - url: https://utilityapi.com/api/v2 description: UtilityAPI Production Server security: - bearerAuth: [] tags: - name: Authorizations description: Submitted authorizations from utility customers paths: /authorizations: get: operationId: listAuthorizations summary: List Authorizations description: List all submitted authorizations for the authenticated account. tags: - Authorizations parameters: - name: limit in: query required: false schema: type: integer default: 100 - name: next in: query required: false schema: type: string - name: status in: query required: false schema: type: string enum: - pending - active - revoked responses: '200': description: List of authorizations content: application/json: schema: $ref: '#/components/schemas/AuthorizationList' '401': $ref: '#/components/responses/Unauthorized' /authorizations/{uid}: get: operationId: getAuthorization summary: Get Authorization description: Retrieve a specific authorization by UID. tags: - Authorizations parameters: - $ref: '#/components/parameters/uid' responses: '200': description: Authorization details content: application/json: schema: $ref: '#/components/schemas/Authorization' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' put: operationId: modifyAuthorization summary: Modify Authorization description: Update metadata on an existing authorization. tags: - Authorizations parameters: - $ref: '#/components/parameters/uid' requestBody: required: true content: application/json: schema: $ref: '#/components/schemas/AuthorizationUpdate' responses: '200': description: Updated authorization content: application/json: schema: $ref: '#/components/schemas/Authorization' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' delete: operationId: deleteAuthorization summary: Delete Authorization description: Delete an authorization and associated data. tags: - Authorizations parameters: - $ref: '#/components/parameters/uid' responses: '204': description: Authorization deleted '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' /authorizations/{uid}/revoke: post: operationId: revokeAuthorization summary: Revoke Authorization description: Revoke a customer's authorization to access their utility data. tags: - Authorizations parameters: - $ref: '#/components/parameters/uid' responses: '200': description: Authorization revoked content: application/json: schema: $ref: '#/components/schemas/Authorization' '401': $ref: '#/components/responses/Unauthorized' '404': $ref: '#/components/responses/NotFound' components: schemas: AuthorizationList: type: object properties: authorizations: type: array items: $ref: '#/components/schemas/Authorization' next: type: string AuthorizationUpdate: type: object properties: metadata: type: object Authorization: type: object properties: uid: type: string form_uid: type: string status: type: string enum: - pending - active - revoked customer_email: type: string utility: type: string created: type: string format: date-time modified: type: string format: date-time Error: type: object properties: errors: type: array items: type: string status: type: string responses: NotFound: description: Resource not found content: application/json: schema: $ref: '#/components/schemas/Error' Unauthorized: description: Missing or invalid authentication token content: application/json: schema: $ref: '#/components/schemas/Error' parameters: uid: name: uid in: path required: true description: Unique identifier of the resource schema: type: string securitySchemes: bearerAuth: type: http scheme: bearer description: API token from the UtilityAPI dashboard externalDocs: description: UtilityAPI Documentation url: https://utilityapi.com/docs