Maxio Reason Codes API

The Reason Code object defines a churn reason that can be presented to customers when they cancel a subscription, such as "too expensive" or "switching providers." Reason codes give merchants visibility into why subscribers are canceling. For more information, see [Configure Churn Reason Codes](https://docs.maxio.com/configuration/advanced-billing/settings/churn-reason-codes).

GitHub OpenAPI

Operations 5

POST /reason_codes.json createReasonCode #
GET /reason_codes.json listReasonCodes #
GET /reason_codes/{reason_code_id}.json readReasonCode #
PUT /reason_codes/{reason_code_id}.json updateReasonCode #
DELETE /reason_codes/{reason_code_id}.json deleteReasonCode #

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/maxio:maxio-reason-codes-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. See our Privacy Policy and Terms.

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

OpenAPI Specification

maxio-reason-codes-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Maxio Reason Codes API
  version: '1.0'
  contact:
    email: support@maxio.com
  description: 'Operations tagged Reason Codes across 2 of this provider''s published API definitions: maxio-advanced-billing-openapi31json.json, maxio-advanced-billing-openapi.yml. Each path carries the servers of the definition it was published in.'
servers:
- url: https://{site}.chargify.com
  description: Default Advanced Billing environment hosted in US. Valid for the majority of our customers.
  variables:
    site:
      default: subdomain
      description: The subdomain for your Advanced Billing site.
- url: https://events.chargify.com/{site}
  description: Default Advanced Billing environment hosted in US. Valid for the majority of our customers.
  variables:
    site:
      default: subdomain
      description: The subdomain for your Advanced Billing site.
- url: https://{site}.ebilling.maxio.com
  description: Advanced Billing environment hosted in EU. Use only when you requested EU hosting for your AB account.
  variables:
    site:
      default: subdomain
      description: The subdomain for your Advanced Billing site.
security:
- BasicAuth: []
tags:
- name: Reason Codes
  description: 'The Reason Code object defines a churn reason that can be presented to customers when they cancel a subscription, such as "too expensive" or "switching providers."


    Reason codes give merchants visibility into why subscribers are canceling. For more information, see Configure Churn Reason Codes.'
paths:
  /reason_codes.json:
    parameters: []
    post:
      tags:
      - Reason Codes
      summary: createReasonCode
      description: 'Creates a reason code for a given site.


        Reason Codes are a way to gain a high-level view of why your customers are cancelling the subscription to your product or service.


        Add a set of churn reason codes to be displayed in-app and/or the Maxio Billing Portal. As your subscribers decide to cancel their subscription, learn why they decided to cancel.


        For more information, see Churn Reason Codes.'
      operationId: createReasonCode
      parameters: []
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              allOf:
              - $ref: '#/components/schemas/CreateReasonCodeRequest'
              - examples:
                - reason_code:
                    code: NOTHANKYOU
                    description: No thank you!
                    position: 5
              contentMediaType: application/json
            examples:
              Example:
                value:
                  reason_code:
                    code: NOTHANKYOU
                    description: No thank you!
                    position: 5
        required: false
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReasonCodeResponse'
        '422':
          description: Unprocessable Entity (WebDAV)
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ErrorListResponse1'
                - description: Error which contains list of messages.
                  examples:
                  - errors:
                    - 'Code: cannot be blank.'
                    - 'Code: This code is already in use.'
                    - 'Description: cannot be blank.'
                contentMediaType: application/json
              examples:
                Example:
                  value:
                    errors:
                    - 'Code: cannot be blank.'
                    - 'Code: This code is already in use.'
                    - 'Description: cannot be blank.'
      deprecated: false
    get:
      tags:
      - Reason Codes
      summary: listReasonCodes
      description: Lists all current churn codes for a given site.
      operationId: listReasonCodes
      parameters:
      - name: page
        in: query
        description: 'Result records are organized in pages. By default, the first page of results is displayed. The page parameter specifies a page number of results to fetch. You can start navigating through the pages to consume the results. You do this by passing in a page parameter. Retrieve the next page by adding ?page=2 to the query string. If there are no results to return, then an empty result set will be returned.

          Use in query `page=1`.'
        style: form
        explode: true
        schema:
          minimum: 1.0
          type: integer
          contentEncoding: int32
          default: 1
          examples:
          - 1
      - name: per_page
        in: query
        description: 'This parameter indicates how many records to fetch in each request. Default value is 20. The maximum allowed values is 200; any per_page value over 200 will be changed to 200.

          Use in query `per_page=200`.'
        style: form
        explode: true
        schema:
          maximum: 200.0
          type: integer
          contentEncoding: int32
          default: 20
          examples:
          - 50
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ReasonCodeResponse'
                description: ''
                examples:
                - - reason_code:
                      id: 2
                      site_id: 2
                      code: LARGE
                      description: This is too complicated
                      position: 1
                      created_at: '2017-02-16T16:49:07-05:00'
                      updated_at: '2017-02-17T16:29:51-05:00'
                  - reason_code:
                      id: 1
                      site_id: 2
                      code: CH1
                      description: This does not meet my needs
                      position: 2
                      created_at: '2017-02-16T16:48:45-05:00'
                      updated_at: '2017-02-17T16:29:59-05:00'
                  - reason_code:
                      id: 5
                      site_id: 2
                      code: HAN99
                      description: Hard to setup
                      position: 3
                      created_at: '2017-02-17T16:29:42-05:00'
                      updated_at: '2017-02-17T16:29:59-05:00'
                contentMediaType: application/json
              examples:
                Example:
                  value:
                  - reason_code:
                      id: 2
                      site_id: 2
                      code: LARGE
                      description: This is too complicated
                      position: 1
                      created_at: '2017-02-16T16:49:07-05:00'
                      updated_at: '2017-02-17T16:29:51-05:00'
                  - reason_code:
                      id: 1
                      site_id: 2
                      code: CH1
                      description: This does not meet my needs
                      position: 2
                      created_at: '2017-02-16T16:48:45-05:00'
                      updated_at: '2017-02-17T16:29:59-05:00'
                  - reason_code:
                      id: 5
                      site_id: 2
                      code: HAN99
                      description: Hard to setup
                      position: 3
                      created_at: '2017-02-17T16:29:42-05:00'
                      updated_at: '2017-02-17T16:29:59-05:00'
        '422':
          description: Unprocessable Entity (WebDAV)
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ErrorListResponse1'
                - description: Error which contains list of messages.
                  examples:
                  - errors:
                    - 'invalid page: 0'
                contentMediaType: application/json
              examples:
                Example:
                  value:
                    errors:
                    - 'invalid page: 0'
      deprecated: false
    servers:
    - url: https://{site}.chargify.com
      description: Default Advanced Billing environment hosted in US. Valid for the majority of our customers.
      variables:
        site:
          default: subdomain
          description: The subdomain for your Advanced Billing site.
    - url: https://events.chargify.com/{site}
      description: Default Advanced Billing environment hosted in US. Valid for the majority of our customers.
      variables:
        site:
          default: subdomain
          description: The subdomain for your Advanced Billing site.
    - url: https://{site}.ebilling.maxio.com
      description: Advanced Billing environment hosted in EU. Use only when you requested EU hosting for your AB account.
      variables:
        site:
          default: subdomain
          description: The subdomain for your Advanced Billing site.
    - url: https://events.chargify.com/{site}
      description: Advanced Billing environment hosted in EU. Use only when you requested EU hosting for your AB account.
      variables:
        site:
          default: subdomain
          description: The subdomain for your Advanced Billing site.
  /reason_codes/{reason_code_id}.json:
    parameters: []
    get:
      tags:
      - Reason Codes
      summary: readReasonCode
      description: Returns a particular churn reason code for a given site by its unique ID.
      operationId: readReasonCode
      parameters:
      - name: reason_code_id
        in: path
        description: The Advanced Billing id of the reason code
        required: true
        schema:
          type: integer
          contentEncoding: int32
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReasonCodeResponse'
        '404':
          description: Not Found
          headers: {}
          content: {}
      deprecated: false
    put:
      tags:
      - Reason Codes
      summary: updateReasonCode
      description: Updates an existing reason code for a given site.
      operationId: updateReasonCode
      parameters:
      - name: reason_code_id
        in: path
        description: The Advanced Billing id of the reason code
        required: true
        schema:
          type: integer
          contentEncoding: int32
      requestBody:
        description: ''
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateReasonCodeRequest'
        required: false
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ReasonCodeResponse'
        '404':
          description: Not Found
          headers: {}
          content: {}
        '422':
          description: Unprocessable Entity (WebDAV)
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/ErrorListResponse1'
                - description: Error which contains list of messages.
                  examples:
                  - errors:
                    - 'Code: This code is already in use.'
                contentMediaType: application/json
              examples:
                Example:
                  value:
                    errors:
                    - 'Code: This code is already in use.'
      deprecated: false
    delete:
      tags:
      - Reason Codes
      summary: deleteReasonCode
      description: Deletes a reason code from the Churn Reason Codes. This code will be immediately removed. This action is not reversible.
      operationId: deleteReasonCode
      parameters:
      - name: reason_code_id
        in: path
        description: The Advanced Billing id of the reason code
        required: true
        schema:
          type: integer
          contentEncoding: int32
      responses:
        '200':
          description: OK
          headers: {}
          content:
            application/json:
              schema:
                allOf:
                - $ref: '#/components/schemas/OkResponse'
                - examples:
                  - ok: ok
                contentMediaType: application/json
              examples:
                Example:
                  value:
                    ok: ok
        '404':
          description: Not Found
          headers: {}
          content: {}
      deprecated: false
    servers:
    - url: https://{site}.chargify.com
      description: Default Advanced Billing environment hosted in US. Valid for the majority of our customers.
      variables:
        site:
          default: subdomain
          description: The subdomain for your Advanced Billing site.
    - url: https://events.chargify.com/{site}
      description: Default Advanced Billing environment hosted in US. Valid for the majority of our customers.
      variables:
        site:
          default: subdomain
          description: The subdomain for your Advanced Billing site.
    - url: https://{site}.ebilling.maxio.com
      description: Advanced Billing environment hosted in EU. Use only when you requested EU hosting for your AB account.
      variables:
        site:
          default: subdomain
          description: The subdomain for your Advanced Billing site.
    - url: https://events.chargify.com/{site}
      description: Advanced Billing environment hosted in EU. Use only when you requested EU hosting for your AB account.
      variables:
        site:
          default: subdomain
          description: The subdomain for your Advanced Billing site.
components:
  schemas:
    ErrorListResponse1:
      title: ErrorListResponse1
      required:
      - errors
      type: object
      properties:
        errors:
          type: array
          items:
            type: string
          description: ''
      description: Error which contains list of messages.
    ReasonCodeResponse:
      title: ReasonCodeResponse
      required:
      - reason_code
      type: object
      properties:
        reason_code:
          $ref: '#/components/schemas/ReasonCode'
    CreateReasonCode:
      title: CreateReasonCode
      required:
      - code
      - description
      type: object
      properties:
        code:
          type: string
          description: The unique identifier for the ReasonCode
        description:
          type: string
          description: The friendly summary of what the code signifies
        position:
          type: integer
          description: The order that code appears in lists
          contentEncoding: int32
    ReasonCode:
      title: ReasonCode
      type: object
      properties:
        id:
          type: integer
          contentEncoding: int32
        site_id:
          type: integer
          contentEncoding: int32
        code:
          type: string
        description:
          type: string
        position:
          type: integer
          contentEncoding: int32
        created_at:
          type: string
          contentEncoding: date-time
        updated_at:
          type: string
          contentEncoding: date-time
    CreateReasonCodeRequest:
      title: CreateReasonCodeRequest
      required:
      - reason_code
      type: object
      properties:
        reason_code:
          $ref: '#/components/schemas/CreateReasonCode'
    OkResponse:
      title: OkResponse
      type: object
      properties:
        ok:
          type: string
    UpdateReasonCode:
      title: UpdateReasonCode
      type: object
      properties:
        code:
          type: string
          description: The unique identifier for the ReasonCode
        description:
          type: string
          description: The friendly summary of what the code signifies
        position:
          type: integer
          description: The order that code appears in lists
          contentEncoding: int32
    UpdateReasonCodeRequest:
      title: UpdateReasonCodeRequest
      required:
      - reason_code
      type: object
      properties:
        reason_code:
          $ref: '#/components/schemas/UpdateReasonCode'
  securitySchemes:
    BasicAuth:
      type: http
      description: The `username` is a Maxio Chargify API key. The `password` is `x`.
      scheme: basic
x-refined-from:
- maxio-advanced-billing-openapi31json.json
- maxio-advanced-billing-openapi.yml
x-provenance:
  method: harvested
  publisher: Maxio
  source: https://developers.maxio.com/static/exports/maxio-advanced-billing-openapi31json.json
  note: split by refine-openapis from the provider's own published document, verified by fetch (openapi/_original/*.fetch.json);
    stamped by stamp-openapi-provenance.py (roadmap#793)