Greenspark Climate API

The Greenspark Climate API creates and reports on verified environmental impacts (carbon, trees, plastic, kelp, water, bees), estimates transaction carbon footprints, and renders embeddable impact widgets. REST over HTTPS, JSON, authenticated with an x-api-key header; URI-path versioned (v1 -> v2).

OpenAPI Specification

greenspark-openapi.yml Raw ↑
openapi: 3.0.0
info:
  title: Greenspark Climate API
  version: 2.3.0
  description: 'Greenspark Impact-as-a-Service Climate API: create carbon-offset, tree-planting, plastic-recovery
    and other climate impacts, fetch impact/project data, carbon estimations, reporting, email templates
    and embeddable impact widgets. Reconstructed by API Evangelist from the provider''s per-endpoint OpenAPI
    definitions published on docs.getgreenspark.com.'
  contact:
    name: Greenspark Support
    email: support@getgreenspark.com
    url: https://www.getgreenspark.com
servers:
- url: https://api.getgreenspark.com
  description: Production
- url: https://sandbox.getgreenspark.com
  description: Sandbox
- url: https://demo-api.getgreenspark.com
  description: Demo
security:
- ApiKeyAuth: []
paths:
  /v1/email/domains:
    post:
      deprecated: true
      description: Deprecated — redirects to v2. Use addDomainV2.
      operationId: addDomain
      parameters: []
      responses:
        '200':
          description: Domain has been successfully added.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomDomainDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your API key.
        '403':
          description: Please upgrade to a growth, premium or enterprise plan.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Add Domain
      tags:
      - Email
    get:
      deprecated: true
      description: Deprecated — redirects to v2. Use fetchDomainsV2.
      operationId: fetchDomains
      parameters: []
      responses:
        '200':
          description: Domains has been successfully queried.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomDomainDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your API key.
        '403':
          description: Please upgrade to a growth, premium or enterprise plan.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Fetch Domains
      tags:
      - Email
  /v2/email/domains:
    post:
      description: Add your domain and receive the DNS records that must be added to your domain.
      operationId: addDomainV2
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CustomDomainRequestBody'
      responses:
        '200':
          description: Domain has been successfully added.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomDomainDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your API key.
        '403':
          description: Please upgrade to a growth, premium or enterprise plan.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Add Domain
      tags:
      - Email
    get:
      description: Fetch your previously added domains.
      operationId: fetchDomainsV2
      parameters: []
      responses:
        '200':
          description: Domains has been successfully queried.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/CustomDomainDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your API key.
        '403':
          description: Please upgrade to a growth, premium or enterprise plan.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Fetch Domains
      tags:
      - Email
  /v1/email/templates:
    post:
      deprecated: true
      description: Deprecated — redirects to v2. Use addTemplateV2. Add your notification template for
        email sending. If you do not want a customizable property to be custom, you should provide the
        default value for that property.
      operationId: addTemplate
      parameters: []
      responses:
        '200':
          description: Notification template has been successfully added.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationTemplateResponseDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your API key.
        '403':
          description: Please upgrade to a growth, premium or enterprise plan.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Add Template
      tags:
      - Email
    get:
      deprecated: true
      description: Deprecated — redirects to v2. Use fetchTemplatesV2.
      operationId: fetchTemplates
      parameters: []
      responses:
        '200':
          description: Templates has been successfully queried.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NotificationTemplateResponseDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your API key.
        '403':
          description: Please upgrade to a growth, premium or enterprise plan.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Fetch Templates
      tags:
      - Email
  /v2/email/templates:
    post:
      description: Add your notification template for email sending. If you do not want a customizable
        property to be custom, you should provide the default value for that property. You can get the
        default values for every template type from the templates-defaults endpoint.
      operationId: addTemplateV2
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationTemplateRequestDto'
      responses:
        '200':
          description: Notification template has been successfully added.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationTemplateResponseDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your API key.
        '403':
          description: Please upgrade to a growth, premium or enterprise plan.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Add Template
      tags:
      - Email
    get:
      description: Fetch templates for email sending.
      operationId: fetchTemplatesV2
      parameters: []
      responses:
        '200':
          description: Templates has been successfully queried.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/NotificationTemplateResponseDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your API key.
        '403':
          description: Please upgrade to a growth, premium or enterprise plan.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Fetch Templates
      tags:
      - Email
  /v2/widgets/by-percentage-of-revenue-widget:
    post:
      summary: By percentage of revenue widget v2
      description: Fetching a widget that describes a given store’s by percentage of revenue impact settings.
      operationId: by-percentage-of-revenue-widget-v2
      parameters:
      - name: lng
        in: query
        description: 'Set the widget''s language. Currently supported languages are: English (en), German
          (de)'
        schema:
          type: string
          default: en
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - integrationSlug
              - color
              properties:
                integrationSlug:
                  type: string
                  description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
                  default: YOUR-SHOP-NAME
                color:
                  type: string
                  description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
                    | "white" | "black" | "grey" | "transparent"'
                  default: green
                withPopup:
                  type: boolean
                  description: Adds a popup for the response, triggered by clicking on the widget
                  default: false
                style:
                  type: string
                  description: 'Select if you want the default style (displayed above) or if you want
                    a simplified version. Current options include: "default" | "simplified"'
                  default: default
                popupTheme:
                  type: string
                  description: Selects the color theme for the popup. Only applies if `withPopup` is set
                    to `true`
                  default: light
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      tags:
      - Widgets
  /v2/widgets/by-percentage-widget:
    post:
      summary: By percentage widget v2
      description: Fetching a widget that describes a given store’s by percentage impact settings.
      operationId: by-percentage-widget-v2
      parameters:
      - name: lng
        in: query
        description: 'Set the widget''s language. Currently supported languages are: English (en), German
          (de)'
        schema:
          type: string
          default: en
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - integrationSlug
              - color
              properties:
                integrationSlug:
                  type: string
                  description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
                  default: YOUR-SHOP-NAME
                color:
                  type: string
                  description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
                    | "white" | "black" | "grey" | "transparent"'
                  default: green
                withPopup:
                  type: boolean
                  description: Adds a popup for the response, triggered by clicking on the widget
                  default: false
                style:
                  type: string
                  description: 'Select if you want the default style (displayed above) or if you want
                    a simplified version. Current options include: "default" | "simplified"'
                  default: default
                popupTheme:
                  type: string
                  description: Selects the color theme for the popup. Only applies if `withPopup` is set
                    to `true`
                  default: light
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      tags:
      - Widgets
  /widgets/by-percentage-widget:
    post:
      summary: By percentage widget
      description: Fetching a widget that describes a given store’s by percentage impact settings.
      operationId: by-percentage-widget
      parameters:
      - name: lng
        in: query
        description: 'Set the widget''s language. Currently supported languages are: English (en), German
          (de)'
        schema:
          type: string
          default: en
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - shopUniqueName
              - color
              properties:
                shopUniqueName:
                  type: string
                  description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
                  default: YOUR-SHOP-NAME
                color:
                  type: string
                  description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
                    | "white" | "black"'
                  default: green
                withPopup:
                  type: boolean
                  description: Adds a popup for the response, triggered by clicking on the widget
                  default: false
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      tags:
      - Widgets
  /v2/widgets/cart-widget:
    post:
      summary: Cart widget v2
      description: Fetching a widget that describes the impact made by the products placed in the cart.
      operationId: cart-widget-v2
      parameters:
      - name: lng
        in: query
        description: 'Set the widget''s language. Currently supported languages are: English (en), German
          (de)'
        schema:
          type: string
          default: en
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - integrationSlug
              - color
              - order
              properties:
                integrationSlug:
                  type: string
                  description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
                  default: YOUR-SHOP-NAME
                color:
                  type: string
                  description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
                    | "white" | "black" | "grey" | "transparent"'
                  default: green
                order:
                  type: object
                  description: Specify the order data to show the correct impact totals in the widget.
                  properties:
                    currency:
                      type: string
                      description: 'This is the order''s currency. For example: "USD" | "GBP" | "EUR"
                        | "AUD" | "NZD"'
                      default: USD
                    totalPrice:
                      type: integer
                      description: Specify the total price of the order as a number in cents.
                      default: 100
                      format: int32
                    lineItems:
                      type: array
                      description: These are all of the products that a customer has in their cart.
                      items:
                        properties:
                          productId:
                            type: string
                            description: Specify the product id of the item in the cart.
                            default: PRODUCT ID OF CART ITEM
                          quantity:
                            type: integer
                            description: Specify the quantity of the product in the cart.
                            default: 1
                            format: int32
                        type: object
                withPopup:
                  type: boolean
                  description: Adds a popup for the response, triggered by clicking on the widget
                  default: false
                style:
                  type: string
                  description: 'Select if you want the default style (displayed above) or if you want
                    a simplified version. Current options include: "default" | "simplified"'
                  default: default
                popupTheme:
                  type: string
                  description: Selects the color theme for the popup. Only applies if `withPopup` is set
                    to `true`
                  default: light
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      tags:
      - Widgets
  /widgets/cart-widget:
    post:
      summary: Cart widget
      description: Fetching a widget that describes the impact made by the products placed in the cart.
      operationId: cart-widget
      parameters:
      - name: lng
        in: query
        description: 'Set the widget''s language. Currently supported languages are: English (en), German
          (de)'
        schema:
          type: string
          default: en
      requestBody:
        content:
          application/json:
            schema:
              type: object
              required:
              - shopUniqueName
              - color
              - order
              properties:
                shopUniqueName:
                  type: string
                  description: 'The name of your store as it is saved in Greenspark. For example: example.myshopify.com'
                  default: YOUR-SHOP-NAME
                color:
                  type: string
                  description: 'Set the widget colour. Current options include: "beige" | "green" | "blue"
                    | "white" | "black"'
                  default: green
                order:
                  type: object
                  description: Specify the order data to show the correct impact totals in the widget.
                  properties:
                    currency:
                      type: string
                      description: 'This is the order''s currency. For example: "USD" | "GBP" | "EUR"
                        | "AUD" | "NZD"'
                      default: USD
                    totalPrice:
                      type: integer
                      description: Specify the total price of the order as a number in cents.
                      default: 100
                      format: int32
                    lineItems:
                      type: array
                      description: These are all of the products that a customer has in their cart.
                      items:
                        properties:
                          productId:
                            type: string
                            description: Specify the product id of the item in the cart.
                            default: PRODUCT ID OF CART ITEM
                          quantity:
                            type: integer
                            description: Specify the quantity of the product in the cart.
                            default: 1
                            format: int32
                        type: object
                withPopup:
                  type: boolean
                  description: Adds a popup for the response, triggered by clicking on the widget
                  default: false
      responses:
        '200':
          description: '200'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
        '400':
          description: '400'
          content:
            application/json:
              examples:
                Result:
                  value: '{}'
              schema:
                type: object
                properties: {}
      deprecated: false
      x-readme:
        code-samples:
        - language: curl
          code: "curl --request POST \\\n     --url 'https://api.getgreenspark.com/widgets/cart-widget?lng=en'\
            \ \\\n     --header 'accept: text/html' \\\n     --header 'content-type: application/json'\
            \ \\\n     --header 'x-api-key: \"YOUR-API-KEY\"' \\\n     --data '\n{\n  \"shopUniqueName\"\
            : \"YOUR-SHOP-NAME\",\n  \"color\": \"green\",\n  \"order\": {\n    \"currency\": \"USD\"\
            ,\n    \"totalPrice\": 100,\n    \"lineItems\": [\n\t\t\t{\n      \t\"productId\": \"YOUR-PRODUCT-ID\"\
            ,\n        \"quantity\": 1\n\t\t\t}\n\t\t]\n  },\n  \"withPopup\": false\n}\n'"
        samples-languages:
        - curl
      tags:
      - Widgets
  /v1/impacts/sources/{sourceId}/triggers/{triggerId}:
    post:
      description: Creates an impact associated with a source and a trigger. Not executable via ReadMe
        MCP execute-request in the current version (read-only MCP). Use get-endpoint output to build integrations
        in your application.
      operationId: createImpact
      parameters:
      - name: sourceId
        required: true
        in: path
        description: The id of the source associated with the impact.
        schema:
          example: 631b035dcd13c4ad66c6d496
          type: string
      - name: triggerId
        required: true
        in: path
        description: The id of the trigger associated with the impact.
        schema:
          example: 281f045dcd23c4ae26c6d498
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImpactDto'
      responses:
        '201':
          description: The impact has been successfully created.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ImpactPurchaseDetail'
        '400':
          description: Bad request.
        '401':
          description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard
            after registration (separate key per environment).
        '403':
          description: Requires growthBusiness, growthBusinessYearly, premiumBusiness, premiumBusinessYearly,
            or enterpriseBusiness subscription.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Create Impact
      tags:
      - Impacts
  /v1/impacts/batch:
    post:
      description: Run multiple create impact call in a batch, equivalent to calling create impact multiple
        times with different parameters. Not executable via ReadMe MCP execute-request in the current
        version (read-only MCP). Use get-endpoint output to build integrations in your application.
      operationId: createImpactBatch
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateImpactBatchRequestBody'
      responses:
        '201':
          description: Every impacts in the batch call has been successfully created.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BatchImpactPurchaseResponses'
        '400':
          description: Bad request.
        '401':
          description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard
            after registration (separate key per environment).
        '403':
          description: Requires premiumBusiness, premiumBusinessYearly, or enterpriseBusiness subscription.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Create Impact in Batch
      tags:
      - Impacts
  /v1/impacts:
    post:
      description: Creates an impact associated with an account id. Not executable via ReadMe MCP execute-request
        in the current version (read-only MCP). Use get-endpoint output to build integrations in your
        application.
      operationId: createTailoredImpact
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ImpactDto'
      responses:
        '201':
          description: The impact has been successfully created.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ImpactPurchaseDetail'
        '400':
          description: Bad request.
        '401':
          description: Provide a valid x-api-key header. Keys are created in the Greenspark dashboard
            after registration (separate key per environment).
        '403':
          description: Requires premiumBusiness, premiumBusinessYearly, or enterpriseBusiness subscription.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Create One-time Impact
      tags:
      - Impacts
  /v1/email/domains/{domainId}:
    delete:
      deprecated: true
      description: Deprecated — redirects to v2. Use deleteDomainV2.
      operationId: deleteDomain
      parameters:
      - name: domainId
        required: true
        in: path
        description: The id of the custom domain object.
        schema:
          example: 63c5857475784b9acf05c919
          type: string
      responses:
        '200':
          description: Domains has been successfully deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomDomainDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your API key.
        '403':
          description: Please upgrade to a growth, premium or enterprise plan.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Delete Domain
      tags:
      - Email
  /v2/email/domains/{domainId}:
    delete:
      description: Delete your domain.
      operationId: deleteDomainV2
      parameters:
      - name: domainId
        required: true
        in: path
        description: The id of the custom domain object.
        schema:
          example: 63c5857475784b9acf05c919
          type: string
      responses:
        '200':
          description: Domains has been successfully deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomDomainDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your API key.
        '403':
          description: Please upgrade to a growth, premium or enterprise plan.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Delete Domain
      tags:
      - Email
  /v1/email/templates/{templateId}:
    delete:
      deprecated: true
      description: Deprecated — redirects to v2. Use deleteTemplateV2.
      operationId: deleteTemplate
      parameters:
      - name: templateId
        required: true
        in: path
        description: The id of the notification template.
        schema:
          example: 853b035dcd13c4ad66c6d618
          type: string
      responses:
        '200':
          description: Template has been successfully deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationTemplateResponseDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your API key.
        '403':
          description: Please upgrade to a growth, premium or enterprise plan.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Delete Template
      tags:
      - Email
    put:
      deprecated: true
      description: Deprecated — redirects to v2. Use updateTemplateV2. Update your notification template
        for email sending.
      operationId: updateTemplate
      parameters:
      - name: templateId
        required: true
        in: path
        description: The id of the notification template.
        schema:
          example: 853b035dcd13c4ad66c6d618
          type: string
      responses:
        '200':
          description: Notification template has been successfully updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationTemplateResponseDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your API key.
        '403':
          description: Please upgrade to a growth, premium or enterprise plan.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Update Template
      tags:
      - Email
  /v2/email/templates/{templateId}:
    delete:
      description: Delete your template.
      operationId: deleteTemplateV2
      parameters:
      - name: templateId
        required: true
        in: path
        description: The id of the notification template.
        schema:
          example: 853b035dcd13c4ad66c6d618
          type: string
      responses:
        '200':
          description: Template has been successfully deleted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationTemplateResponseDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your API key.
        '403':
          description: Please upgrade to a growth, premium or enterprise plan.
        '404':
          description: Not found.
      security:
      - access-key: []
      summary: Delete Template
      tags:
      - Email
    put:
      description: Update your notification template for email sending.  If you do not want a customizable
        property to be custom, you should provide the default value for that property. You can get the
        default values for every template type from the templates-defaults endpoint.
      operationId: updateTemplateV2
      parameters:
      - name: templateId
        required: true
        in: path
        description: The id of the notification template.
        schema:
          example: 853b035dcd13c4ad66c6d618
          type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/NotificationTemplateRequestDto'
      responses:
        '200':
          description: Notification template has been successfully updated.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotificationTemplateResponseDto'
        '400':
          description: Bad request.
        '401':
          description: Provide your 

# --- truncated at 32 KB (261 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/greenspark/refs/heads/main/openapi/greenspark-openapi.yml