openapi: 3.1.0 info: title: CMS Blue Button 2.0 API description: >- Blue Button 2.0 is a standards-based HL7 FHIR R4 API that delivers Medicare Part A, B, and D claims data for over 60 million beneficiaries to registered third-party applications. Beneficiaries authorize sharing via OAuth 2.0. Blue Button 2.0 anchors CMS's Patient Access API program under the 21st Century Cures Act. version: 'v2' contact: name: CMS Blue Button Developer Support url: https://bluebutton.cms.gov/developers/ termsOfService: https://bluebutton.cms.gov/terms/ externalDocs: description: CMS Blue Button 2.0 API Documentation url: https://bluebutton.cms.gov/api-documentation/ servers: - url: https://api.bluebutton.cms.gov/v2/fhir description: Blue Button 2.0 production FHIR server - url: https://sandbox.bluebutton.cms.gov/v2/fhir description: Blue Button 2.0 sandbox FHIR server tags: - name: Capability description: FHIR server capability statements and metadata. - name: Patient description: Beneficiary (Patient) resources. - name: Coverage description: Beneficiary coverage records. - name: ExplanationOfBenefit description: Medicare claims expressed as ExplanationOfBenefit resources. security: - oauth2: [] paths: /metadata: get: operationId: getCapabilityStatement summary: Get Capability Statement description: Returns the FHIR CapabilityStatement describing supported resources and operations. tags: - Capability security: [] responses: '200': description: Server capability statement. content: application/fhir+json: schema: $ref: '#/components/schemas/FHIRResource' /Patient: get: operationId: searchPatient summary: Search Patient description: Returns the authenticated Medicare beneficiary as a FHIR Patient resource. tags: - Patient responses: '200': description: A FHIR Bundle of Patient resources. content: application/fhir+json: schema: $ref: '#/components/schemas/FHIRBundle' '401': $ref: '#/components/responses/Unauthorized' /Patient/{id}: get: operationId: readPatient summary: Read Patient description: Returns a single Patient resource by ID. tags: - Patient parameters: - name: id in: path required: true description: FHIR Patient resource ID. schema: type: string responses: '200': description: A FHIR Patient resource. content: application/fhir+json: schema: $ref: '#/components/schemas/FHIRResource' '404': $ref: '#/components/responses/NotFound' /Coverage: get: operationId: searchCoverage summary: Search Coverage description: Returns Medicare coverage records for the authenticated beneficiary. tags: - Coverage parameters: - name: beneficiary in: query description: Beneficiary patient reference. schema: type: string responses: '200': description: A FHIR Bundle of Coverage resources. content: application/fhir+json: schema: $ref: '#/components/schemas/FHIRBundle' '401': $ref: '#/components/responses/Unauthorized' /Coverage/{id}: get: operationId: readCoverage summary: Read Coverage description: Returns a single Coverage resource by ID. tags: - Coverage parameters: - name: id in: path required: true description: FHIR Coverage resource ID. schema: type: string responses: '200': description: A FHIR Coverage resource. content: application/fhir+json: schema: $ref: '#/components/schemas/FHIRResource' '404': $ref: '#/components/responses/NotFound' /ExplanationOfBenefit: get: operationId: searchExplanationOfBenefit summary: Search ExplanationOfBenefit description: Returns ExplanationOfBenefit (claims) records for the authenticated beneficiary. tags: - ExplanationOfBenefit parameters: - name: patient in: query description: Patient resource reference. schema: type: string - name: _lastUpdated in: query description: Filter by last-updated timestamp. schema: type: string responses: '200': description: A FHIR Bundle of ExplanationOfBenefit resources. content: application/fhir+json: schema: $ref: '#/components/schemas/FHIRBundle' '401': $ref: '#/components/responses/Unauthorized' /ExplanationOfBenefit/{id}: get: operationId: readExplanationOfBenefit summary: Read ExplanationOfBenefit description: Returns a single ExplanationOfBenefit resource by ID. tags: - ExplanationOfBenefit parameters: - name: id in: path required: true description: FHIR ExplanationOfBenefit resource ID. schema: type: string responses: '200': description: A FHIR ExplanationOfBenefit resource. content: application/fhir+json: schema: $ref: '#/components/schemas/FHIRResource' '404': $ref: '#/components/responses/NotFound' components: securitySchemes: oauth2: type: oauth2 description: >- OAuth 2.0 authorization code flow used by Medicare beneficiaries to grant access to a third-party application. flows: authorizationCode: authorizationUrl: https://api.bluebutton.cms.gov/v2/o/authorize/ tokenUrl: https://api.bluebutton.cms.gov/v2/o/token/ scopes: patient/Patient.read: Read beneficiary Patient resource. patient/Coverage.read: Read beneficiary Coverage resources. patient/ExplanationOfBenefit.read: Read beneficiary claims. responses: Unauthorized: description: Authentication credentials are missing or invalid. content: application/fhir+json: schema: $ref: '#/components/schemas/FHIRResource' NotFound: description: The requested resource was not found. content: application/fhir+json: schema: $ref: '#/components/schemas/FHIRResource' schemas: FHIRResource: type: object description: A generic FHIR R4 resource. properties: resourceType: type: string id: type: string additionalProperties: true FHIRBundle: type: object description: A FHIR R4 Bundle resource wrapping a collection of resources. properties: resourceType: type: string const: Bundle type: type: string total: type: integer entry: type: array items: type: object additionalProperties: true additionalProperties: true x-generated-from: https://bluebutton.cms.gov/api-documentation/ x-generated-by: claude-crawl-2026-05-08