> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mezmo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Perform bulk operations on Enterprise Accounts

> Perform bulk operations (CREATE, UPDATE, DELETE) on Enterprise Accounts



## OpenAPI

````yaml /apis/mezmo-api.yaml patch /v3/enterprise/account
openapi: 3.1.0
info:
  title: Mezmo API
  description: >-
    *REST API for the Mezmo platform: send and export log data, build and

    manage telemetry pipelines, and administer enterprise accounts.*


    To use the inline testing functionality here, go into your Mezmo account

    and add the following address to your CORS Origins page:
    `https://docs.mezmo.com`.
  version: 3.0.0
  contact:
    name: Mezmo
    email: support@mezmo.com
    url: https://mezmo.com/support
servers:
  - url: https://api.mezmo.com
security:
  - AccessToken: []
tags:
  - name: Account
    description: Perform account level actions
  - name: Alerting
    description: API to control alerts on pipelines
  - name: Archiving
    description: >
      >*Authentication*: You can find instructions on authentication
      [here](/log-analysis-api/ref#authentication).


      The LogDNA Archiving API enables you to programmatically configure your
      archiving instances via code.

      Specifically you can set up cold storage buckets to send your logs for
      long term storage.
  - name: Board
    description: >
      >*Authentication*: You can find instructions on authentication
      [here](/log-analysis-api/ref#authentication).


      The LogDNA's API's Board endpoints are used to create, get, list, and
      delete boards.
  - name: Configuration
    description: >
      >*Authentication*: You can find instructions on authentication
      [here](/log-analysis-api/ref#authentication).


      The LogDNA API's Configuration endpoints are used to create, update, and
      delete views, alerts, and categories.
  - name: Data Classification & Profiling
    description: API for classifying and profiling data
  - name: Edge - Local Deploy
    description: User routes that are available to use with local Edge instances
  - name: Enterprise
    description: Routes for management enterprise level resources
  - name: Enterprise v1
    description: Legacy enterprise management endpoints, superseded by the Enterprise API.
  - name: Exclusions
    description: >
      >*Authentication*: You can find instructions on authentication
      [here](/log-analysis-api/ref#authentication).


      Control what you store by creating exclusion rules. New lines that match
      an exclusion rule will not be stored and will not count toward your
      storage quota.
  - name: Export
    description: >
      LogDNA provides two endpoints for exporting your log lines.

      Read the sections below to learn about each, and determine which is
      appropriate for your use case.


      ## Export API v1

      The Export API v1 is used to export log lines in
      [JSONL](https://jsonlines.org/) format. Based on

      your specific plan, the maximum number of logs returned is limited to
      10,000 / 20,000. There are two distinct functionalities:

      1. Streaming desired log lines directly from the response as raw text data

      2. Specifying an email to receive a link that can be used to the download
      the desired log lines


      > Note

      > When an email address is specified, the desired log lines will not be
      streamed to the response body.

      > The response will instead send a notification indicating that the
      request was successful and that the results

      > will be sent to the email address provided in the request. This entails
      archiving and uploading the desired logs

      > to a storage provider. The email includes a URI to download the logs. Be
      aware that access to this URI will expire

      > after 24-48 hours.


      ## Export API v2

      The Export API v2 provides an enhancement over v1, allowing you to export
      any number of log lines using pagination and

      by-passing the plan-specific limit imposed in v1. By making (multiple)
      subsequent requests using the `pagination_id` parameter,

      you can retrieve logs in batches of JSON until all matching log lines have
      been returned.


      Each Export API v2 request is limited to 10,000 lines.


      ### Pagination Functionality

      Pagination is only necessary when the desired set of log lines is larger
      than 10,000, since this is the maximum number of results

      that can be returned in a given page. If an export does not exceed this
      size, the behavior is similar to v1 -- all of the logs will be

      returned in a single "page" and no further requests are needed. When an
      export does exceed this size, refer to the steps outlined below.


      This is the expected workflow to export a set (cardinality > 10,000) of
      log lines that requires pagination:

      1. Send an initial request with valid query parameters to retrieve logs.
      Pass a `null` value for the `pagination_id` in the first request.

      2. The JSON response contains 2 fields: `lines` and `pagination_id`. The
      former is an array containing the corresponding batch (the first
         batch in this case) of logs and the latter is a token used to retrieve the next page of results.
      3. Send a subsequent request using the same initial query parameters and
      also passing in the token received in the response to the `pagination_id`
         parameter. This will retrieve the next page of results.
      4. Repeat this request-response cycle, updating the `pagination_id`
      parameter with the token returned in every new response, until the
         response eventually returns a `null` value for the token. This indicates that the corresponding batch of logs is the last and that you have
         reached the final page.

      > Important Considerations

      > In subsequent requests to paginate through results, make sure none of
      the query parameters & values are modified from the initial request

      > (excluding `pagination_id`)


      > The tokens used in the `pagination_id` parameter are tied to a specific
      export and page so they can be used repeatedly in requests to return

      > deterministic results


      > "0" can be passed in to the `from` and `to` parameters which will be
      resolved to timestamps for a plan's retention boundary and the current

      > time respectively. This behavior is independent so the value can be
      passed interchangeably to the parameters -- resulting in 4 possible
      scenarios:

      > - [`from`: \<user-specified timestamp\>, `to`: \<user-specified
      timestamp\>]

      > - [`from`: 0 (retention boundary), `to`: \<user-specified timestamp\>]

      > - [`from`: \<user-specified timestamp\>, `to`: 0 (current time)]

      > - [`from`: 0 (retention boundary), `to`: 0 (current time)]
  - name: Groups
    description: >-
      Manage log groups that scope which data is accessible to members in that
      group.
  - name: Incident Mode
    description: Change or read state of pipeline (incident mode on/off)
  - name: Index Rate Alert
    description: Configure alerts that fire when the log index rate crosses a threshold.
  - name: Ingestion
    description: Ingestion API
  - name: Keys
    description: Create and manage ingestion and service keys for an account.
  - name: Log Volume Reduction
    description: CRUD operations for log volume reduction
  - name: Members
    description: Manage organization members, their roles, and RBAC group assignments.
  - name: Metrics
    description: Usage metrics for pipelines
  - name: Parsing Template
    description: Manage custom log parsing templates.
  - name: Pipeline Export
    description: Export pipeline to terraform
  - name: Pipeline Management
    description: CRUD Operations for pipeline
  - name: Pipeline Nodes
    description: CRUD operations for sources, processors, and destinations
  - name: Processor Groups
    description: CRUD operations for Processor Groups
  - name: Sampling and Simulation
    description: >-
      Create samples of data and run them through a simulated pipeline without
      affecting your published pipeline
  - name: Screens
    description: Create and manage custom UI layouts for display on large format screens.
  - name: Shared Sources
    description: Create and manage sources for use across multiple pipelines
  - name: Suspensions
    description: >
      >*Authentication*: You can find instructions on authentication
      [here](/log-analysis-api/ref#authentication).


      The LogDNA Start/Stop Ingestion API allows users to programmatically
      manage their data ingestion status.


      Users can get the current status of their ingestion, suspend their
      ingestion, and resume their ingestion. To prevent an

      accidental API call, the suspension of ingestion requires two subsequent
      API calls.


      > You can find instructions on authentication
      [here](/log-analysis-api/ref#authentication).
  - name: Usage v1
    description: >
      >*Authentication*: You can find instructions on authentication
      [here](/log-analysis-api/ref#authentication).


      The Usage API provides endpoints for retrieving aggregated usage
      information for applications, hosts and tags during a time period.


      While the `to` and `from` times are unix timestamps, the report is
      granular by day.  Therefore only the day portion is used to establish a
      date range.


      ### How is **Usage** defined?


      This API defines usage as a percentage of the total number of lines
      ingested by the account within the defined period of time. For

      example, an app called `myapp` that returns a percentage of `15` in the
      response object has 15 percent of their logs coming from `myapp`.
  - name: Usage v2
    description: >
      >*Authentication*: You can find instructions on authentication
      [here](/log-analysis-api/ref#authentication).


      The Usage API provides endpoints for retrieving aggregated usage
      information for applications, hosts and tags during a time period.


      While the `to` and `from` times are unix timestamps, the report is
      granular by day.  Therefore only the day portion is used to establish a
      date range.


      ### How is **Usage** defined?


      This API defines usage as the number of bytes used by the log lines stored

      on disk by the account within the defined period of time. For example,

      an app called `myapp` that returns `150,000` total bytes in the response

      object indicates that `myapp` is consuming `150,000` bytes of disk storage

      over the time range.
externalDocs:
  url: https://docs.mezmo.com
paths:
  /v3/enterprise/account:
    patch:
      tags:
        - Enterprise
      summary: Perform bulk operations on Enterprise Accounts
      description: Perform bulk operations (CREATE, UPDATE, DELETE) on Enterprise Accounts
      operationId: patchEnterpriseAccountList
      requestBody:
        content:
          application/x-bulk+json:
            schema:
              type: object
              title: Account Bulk Operations Request
              description: Request body for bulk operations on accounts
              properties:
                operations:
                  type: array
                  minItems: 1
                  maxItems: 100
                  description: List of bulk operations
                  items:
                    type: object
                    title: Bulk Operation
                    description: Represents a single bulk operation on an entity
                    allOf:
                      - if:
                          properties:
                            action:
                              enum:
                                - UPDATE
                                - DELETE
                              type: string
                        then:
                          required:
                            - entity_id
                      - if:
                          properties:
                            action:
                              enum:
                                - CREATE
                                - UPDATE
                              type: string
                        then:
                          required:
                            - entity
                    properties:
                      operation_id:
                        type: string
                        title: Client generated id to associate operation with result
                        description: >-
                          Used for navigation only, not persisted in database.

                          If not provided, the array index (as string) will be
                          used in the response
                        example: 4b1a1504fa47866dafe8b5d4
                      action:
                        type: string
                        enum:
                          - CREATE
                          - UPDATE
                          - DELETE
                        description: Operation type (enum, not extensible)
                      entity_id:
                        type: string
                        title: Entity unique identifier
                        description: >-
                          The identifier of the entity for UPDATE and DELETE
                          operations.

                          MUST be null or omitted for CREATE operations
                        example: 471ef1c4154b987a94509213
                      entity:
                        $ref: '#/components/schemas/account-create-request'
                    required:
                      - action
              required:
                - operations
        required: true
        description: Request body for bulk operations on accounts
      responses:
        '400':
          description: >-
            A normalized representation of an error that is returned from an
            http request

            in response to failed input validation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/validation-error'
        '401':
          description: >-
            A normalized representation of an error that is returned from an
            http request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http-error'
        '422':
          description: |-
            Response format containing the results of bulk operations,
            in addition to the standard metadata object.
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                title: PatchEnterpriseAccountListResponse
                description: |-
                  Response format containing the results of bulk operations,
                  in addition to the standard metadata object.
                properties:
                  meta:
                    type: object
                    description: >-
                      Contains additional contextual information about the api
                      response.
                    properties:
                      type:
                        type: string
                        description: A human readable identifier denoting the resource type
                        minLength: 1
                        maxLength: 50
                      page:
                        type: object
                        properties:
                          next:
                            type: string
                            nullable: true
                            maxLength: 256
                          previous:
                            type: string
                            nullable: true
                            maxLength: 256
                      pk:
                        type: string
                        description: >-
                          Indicates the data property which holds the resource
                          identifier
                        nullable: true
                        maxLength: 50
                      links:
                        type: object
                        description: >-
                          An object containing uri templates to this, and
                          related resources
                        additionalProperties: true
                        properties:
                          self:
                            type: object
                            additionalProperties: true
                            properties:
                              list:
                                nullable: true
                                additionalProperties: false
                                type: object
                                properties:
                                  method:
                                    enum:
                                      - acl
                                      - bind
                                      - checkout
                                      - connect
                                      - copy
                                      - delete
                                      - get
                                      - head
                                      - link
                                      - lock
                                      - m-search
                                      - merge
                                      - mkactivity
                                      - mkcalendar
                                      - mkcol
                                      - move
                                      - notify
                                      - options
                                      - patch
                                      - post
                                      - propfind
                                      - proppatch
                                      - purge
                                      - put
                                      - rebind
                                      - report
                                      - search
                                      - source
                                      - subscribe
                                      - trace
                                      - unbind
                                      - unlink
                                      - unlock
                                      - unsubscribe
                                    type: string
                                    example: get
                                  uri:
                                    type: string
                                    format: uri-template
                                    maxLength: 250
                                    description: >-
                                      A uri template for retrieving a list of
                                      the resource type
                                    example: >-
                                      https://api.mezmo.com/v3/enterprise/resource
                              detail:
                                nullable: true
                                additionalProperties: false
                                type: object
                                properties:
                                  method:
                                    enum:
                                      - acl
                                      - bind
                                      - checkout
                                      - connect
                                      - copy
                                      - delete
                                      - get
                                      - head
                                      - link
                                      - lock
                                      - m-search
                                      - merge
                                      - mkactivity
                                      - mkcalendar
                                      - mkcol
                                      - move
                                      - notify
                                      - options
                                      - patch
                                      - post
                                      - propfind
                                      - proppatch
                                      - purge
                                      - put
                                      - rebind
                                      - report
                                      - search
                                      - source
                                      - subscribe
                                      - trace
                                      - unbind
                                      - unlink
                                      - unlock
                                      - unsubscribe
                                    type: string
                                    example: get
                                  uri:
                                    type: string
                                    format: uri-template
                                    maxLength: 250
                                    description: >-
                                      A uri template for retrieving a single
                                      detail representation 

                                      of the resource type
                                    example: >-
                                      https://api.mezmo.com/v3/enterprise/resource/{resource_id}
                              update:
                                nullable: true
                                additionalProperties: false
                                type: object
                                properties:
                                  method:
                                    enum:
                                      - acl
                                      - bind
                                      - checkout
                                      - connect
                                      - copy
                                      - delete
                                      - get
                                      - head
                                      - link
                                      - lock
                                      - m-search
                                      - merge
                                      - mkactivity
                                      - mkcalendar
                                      - mkcol
                                      - move
                                      - notify
                                      - options
                                      - patch
                                      - post
                                      - propfind
                                      - proppatch
                                      - purge
                                      - put
                                      - rebind
                                      - report
                                      - search
                                      - source
                                      - subscribe
                                      - trace
                                      - unbind
                                      - unlink
                                      - unlock
                                      - unsubscribe
                                    type: string
                                    example: patch
                                  uri:
                                    type: string
                                    format: uri-template
                                    maxLength: 250
                                    description: >-
                                      A uri template for partially updating an
                                      individual resource
                                    example: >-
                                      https://api.mezmo.com/v3/enterprise/resource/{resource_id}
                              replace:
                                nullable: true
                                additionalProperties: false
                                type: object
                                properties:
                                  method:
                                    enum:
                                      - acl
                                      - bind
                                      - checkout
                                      - connect
                                      - copy
                                      - delete
                                      - get
                                      - head
                                      - link
                                      - lock
                                      - m-search
                                      - merge
                                      - mkactivity
                                      - mkcalendar
                                      - mkcol
                                      - move
                                      - notify
                                      - options
                                      - patch
                                      - post
                                      - propfind
                                      - proppatch
                                      - purge
                                      - put
                                      - rebind
                                      - report
                                      - search
                                      - source
                                      - subscribe
                                      - trace
                                      - unbind
                                      - unlink
                                      - unlock
                                      - unsubscribe
                                    type: string
                                    example: put
                                  uri:
                                    type: string
                                    format: uri-template
                                    maxLength: 250
                                    description: >-
                                      A uri template for fully replacing or
                                      updating an individual resource
                                    example: >-
                                      https://api.mezmo.com/v3/enterprise/resource/{resource_id}
                              create:
                                nullable: true
                                additionalProperties: false
                                type: object
                                properties:
                                  method:
                                    enum:
                                      - acl
                                      - bind
                                      - checkout
                                      - connect
                                      - copy
                                      - delete
                                      - get
                                      - head
                                      - link
                                      - lock
                                      - m-search
                                      - merge
                                      - mkactivity
                                      - mkcalendar
                                      - mkcol
                                      - move
                                      - notify
                                      - options
                                      - patch
                                      - post
                                      - propfind
                                      - proppatch
                                      - purge
                                      - put
                                      - rebind
                                      - report
                                      - search
                                      - source
                                      - subscribe
                                      - trace
                                      - unbind
                                      - unlink
                                      - unlock
                                      - unsubscribe
                                    type: string
                                    example: post
                                  uri:
                                    type: string
                                    format: uri-template
                                    maxLength: 250
                                    description: >-
                                      A uri template for creating a new instance
                                      of a specific resource
                                    example: >-
                                      https://api.mezmo.com/v3/enterprise/resource
                          related:
                            type: object
                            additionalProperties: true
                            description: >-
                              Additional URI templates for interacting with
                              resources 

                              which are tightly related
                        required:
                          - self
                    required:
                      - type
                      - page
                      - pk
                      - links
                  data:
                    type: object
                    title: Account Bulk Operations Response
                    description: Response body for bulk operations on accounts
                    properties:
                      status:
                        type: string
                        enum:
                          - SUCCEEDED
                          - FAILED
                          - PARTIAL
                        title: Overall status of the bulk operation
                      operations:
                        type: array
                        title: List of bulk operations
                        description: >-
                          Results for each operation from the request. Should be
                          in the same order as the request operations
                        items:
                          type: object
                          title: Bulk Operation Result
                          description: >-
                            Represents the result of a single bulk operation on
                            an entity
                          properties:
                            operation_id:
                              type: string
                              title: Matching operation_id or index from request
                              description: >-
                                Matches the operation_id from the request if
                                provided,

                                otherwise the index of the operation as a string
                              example: 408efce8aa57bd0d8a861298
                            action:
                              type: string
                              enum:
                                - CREATE
                                - UPDATE
                                - DELETE
                              description: Operation type (enum, not extensible)
                            entity_id:
                              type: string
                              title: Entity identifier
                              description: Entity identifier for UPDATE / DELETE operations
                              example: cb7b7c1f5100d2d5d31ad4f1
                            entity:
                              $ref: '#/components/schemas/account'
                            result:
                              type: object
                              title: Operation result
                              description: Result details for a single operation
                              properties:
                                status:
                                  type: string
                                  enum:
                                    - SUCCEEDED
                                    - FAILED
                                  title: Operation result status
                                detail:
                                  type: string
                                  title: Human readable message
                                  description: Detailed message about the operation result
                                  example: Account created successfully
                                context:
                                  type: array
                                  title: Detailed error information
                                  description: |-
                                    List of objects providing additional context
                                    for errors or failures
                                  items:
                                    type: object
                                    title: Detailed error information
                                    properties:
                                      message:
                                        type: string
                                        title: Specific error details
                                        example: Account not found
                                      code:
                                        type: string
                                        title: Machine readable error code
                                        example: ECONTRACT
                                    required:
                                      - message
                                      - code
                              required:
                                - status
                                - detail
                                - context
                          required:
                            - operation_id
                            - action
                    required:
                      - status
                      - operations
                required:
                  - meta
                  - data
        '429':
          description: >-
            A normalized representation of an error that is returned from an
            http request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http-error'
        '500':
          description: >-
            A normalized representation of an error that is returned from an
            http request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http-error'
        5XX:
          description: >-
            A normalized representation of an error that is returned from an
            http request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http-error'
        4XX:
          description: >-
            A normalized representation of an error that is returned from an
            http request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/http-error'
        2XX:
          description: |-
            Response format containing the results of bulk operations,
            in addition to the standard metadata object.
          content:
            application/json:
              schema:
                additionalProperties: false
                type: object
                title: PatchEnterpriseAccountListResponse
                description: |-
                  Response format containing the results of bulk operations,
                  in addition to the standard metadata object.
                properties:
                  meta:
                    type: object
                    description: >-
                      Contains additional contextual information about the api
                      response.
                    properties:
                      type:
                        type: string
                        description: A human readable identifier denoting the resource type
                        minLength: 1
                        maxLength: 50
                      page:
                        type: object
                        properties:
                          next:
                            type: string
                            nullable: true
                            maxLength: 256
                          previous:
                            type: string
                            nullable: true
                            maxLength: 256
                      pk:
                        type: string
                        description: >-
                          Indicates the data property which holds the resource
                          identifier
                        nullable: true
                        maxLength: 50
                      links:
                        type: object
                        description: >-
                          An object containing uri templates to this, and
                          related resources
                        additionalProperties: true
                        properties:
                          self:
                            type: object
                            additionalProperties: true
                            properties:
                              list:
                                nullable: true
                                additionalProperties: false
                                type: object
                                properties:
                                  method:
                                    enum:
                                      - acl
                                      - bind
                                      - checkout
                                      - connect
                                      - copy
                                      - delete
                                      - get
                                      - head
                                      - link
                                      - lock
                                      - m-search
                                      - merge
                                      - mkactivity
                                      - mkcalendar
                                      - mkcol
                                      - move
                                      - notify
                                      - options
                                      - patch
                                      - post
                                      - propfind
                                      - proppatch
                                      - purge
                                      - put
                                      - rebind
                                      - report
                                      - search
                                      - source
                                      - subscribe
                                      - trace
                                      - unbind
                                      - unlink
                                      - unlock
                                      - unsubscribe
                                    type: string
                                    example: get
                                  uri:
                                    type: string
                                    format: uri-template
                                    maxLength: 250
                                    description: >-
                                      A uri template for retrieving a list of
                                      the resource type
                                    example: >-
                                      https://api.mezmo.com/v3/enterprise/resource
                              detail:
                                nullable: true
                                additionalProperties: false
                                type: object
                                properties:
                                  method:
                                    enum:
                                      - acl
                                      - bind
                                      - checkout
                                      - connect
                                      - copy
                                      - delete
                                      - get
                                      - head
                                      - link
                                      - lock
                                      - m-search
                                      - merge
                                      - mkactivity
                                      - mkcalendar
                                      - mkcol
                                      - move
                                      - notify
                                      - options
                                      - patch
                                      - post
                                      - propfind
                                      - proppatch
                                      - purge
                                      - put
                                      - rebind
                                      - report
                                      - search
                                      - source
                                      - subscribe
                                      - trace
                                      - unbind
                                      - unlink
                                      - unlock
                                      - unsubscribe
                                    type: string
                                    example: get
                                  uri:
                                    type: string
                                    format: uri-template
                                    maxLength: 250
                                    description: >-
                                      A uri template for retrieving a single
                                      detail representation 

                                      of the resource type
                                    example: >-
                                      https://api.mezmo.com/v3/enterprise/resource/{resource_id}
                              update:
                                nullable: true
                                additionalProperties: false
                                type: object
                                properties:
                                  method:
                                    enum:
                                      - acl
                                      - bind
                                      - checkout
                                      - connect
                                      - copy
                                      - delete
                                      - get
                                      - head
                                      - link
                                      - lock
                                      - m-search
                                      - merge
                                      - mkactivity
                                      - mkcalendar
                                      - mkcol
                                      - move
                                      - notify
                                      - options
                                      - patch
                                      - post
                                      - propfind
                                      - proppatch
                                      - purge
                                      - put
                                      - rebind
                                      - report
                                      - search
                                      - source
                                      - subscribe
                                      - trace
                                      - unbind
                                      - unlink
                                      - unlock
                                      - unsubscribe
                                    type: string
                                    example: patch
                                  uri:
                                    type: string
                                    format: uri-template
                                    maxLength: 250
                                    description: >-
                                      A uri template for partially updating an
                                      individual resource
                                    example: >-
                                      https://api.mezmo.com/v3/enterprise/resource/{resource_id}
                              replace:
                                nullable: true
                                additionalProperties: false
                                type: object
                                properties:
                                  method:
                                    enum:
                                      - acl
                                      - bind
                                      - checkout
                                      - connect
                                      - copy
                                      - delete
                                      - get
                                      - head
                                      - link
                                      - lock
                                      - m-search
                                      - merge
                                      - mkactivity
                                      - mkcalendar
                                      - mkcol
                                      - move
                                      - notify
                                      - options
                                      - patch
                                      - post
                                      - propfind
                                      - proppatch
                                      - purge
                                      - put
                                      - rebind
                                      - report
                                      - search
                                      - source
                                      - subscribe
                                      - trace
                                      - unbind
                                      - unlink
                                      - unlock
                                      - unsubscribe
                                    type: string
                                    example: put
                                  uri:
                                    type: string
                                    format: uri-template
                                    maxLength: 250
                                    description: >-
                                      A uri template for fully replacing or
                                      updating an individual resource
                                    example: >-
                                      https://api.mezmo.com/v3/enterprise/resource/{resource_id}
                              create:
                                nullable: true
                                additionalProperties: false
                                type: object
                                properties:
                                  method:
                                    enum:
                                      - acl
                                      - bind
                                      - checkout
                                      - connect
                                      - copy
                                      - delete
                                      - get
                                      - head
                                      - link
                                      - lock
                                      - m-search
                                      - merge
                                      - mkactivity
                                      - mkcalendar
                                      - mkcol
                                      - move
                                      - notify
                                      - options
                                      - patch
                                      - post
                                      - propfind
                                      - proppatch
                                      - purge
                                      - put
                                      - rebind
                                      - report
                                      - search
                                      - source
                                      - subscribe
                                      - trace
                                      - unbind
                                      - unlink
                                      - unlock
                                      - unsubscribe
                                    type: string
                                    example: post
                                  uri:
                                    type: string
                                    format: uri-template
                                    maxLength: 250
                                    description: >-
                                      A uri template for creating a new instance
                                      of a specific resource
                                    example: >-
                                      https://api.mezmo.com/v3/enterprise/resource
                          related:
                            type: object
                            additionalProperties: true
                            description: >-
                              Additional URI templates for interacting with
                              resources 

                              which are tightly related
                        required:
                          - self
                    required:
                      - type
                      - page
                      - pk
                      - links
                  data:
                    type: object
                    title: Account Bulk Operations Response
                    description: Response body for bulk operations on accounts
                    properties:
                      status:
                        type: string
                        enum:
                          - SUCCEEDED
                          - FAILED
                          - PARTIAL
                        title: Overall status of the bulk operation
                      operations:
                        type: array
                        title: List of bulk operations
                        description: >-
                          Results for each operation from the request. Should be
                          in the same order as the request operations
                        items:
                          type: object
                          title: Bulk Operation Result
                          description: >-
                            Represents the result of a single bulk operation on
                            an entity
                          properties:
                            operation_id:
                              type: string
                              title: Matching operation_id or index from request
                              description: >-
                                Matches the operation_id from the request if
                                provided,

                                otherwise the index of the operation as a string
                              example: 408efce8aa57bd0d8a861298
                            action:
                              type: string
                              enum:
                                - CREATE
                                - UPDATE
                                - DELETE
                              description: Operation type (enum, not extensible)
                            entity_id:
                              type: string
                              title: Entity identifier
                              description: Entity identifier for UPDATE / DELETE operations
                              example: cb7b7c1f5100d2d5d31ad4f1
                            entity:
                              $ref: '#/components/schemas/account'
                            result:
                              type: object
                              title: Operation result
                              description: Result details for a single operation
                              properties:
                                status:
                                  type: string
                                  enum:
                                    - SUCCEEDED
                                    - FAILED
                                  title: Operation result status
                                detail:
                                  type: string
                                  title: Human readable message
                                  description: Detailed message about the operation result
                                  example: Account created successfully
                                context:
                                  type: array
                                  title: Detailed error information
                                  description: |-
                                    List of objects providing additional context
                                    for errors or failures
                                  items:
                                    type: object
                                    title: Detailed error information
                                    properties:
                                      message:
                                        type: string
                                        title: Specific error details
                                        example: Account not found
                                      code:
                                        type: string
                                        title: Machine readable error code
                                        example: ECONTRACT
                                    required:
                                      - message
                                      - code
                              required:
                                - status
                                - detail
                                - context
                          required:
                            - operation_id
                            - action
                    required:
                      - status
                      - operations
                required:
                  - meta
                  - data
      security:
        - AccessToken: []
components:
  schemas:
    account-create-request:
      type: object
      title: Account
      description: |-
        Represents a platform level account
        registration, authentication and authorization.
      properties:
        company:
          type: string
          maxLength: 250
          description: Name of the company which owns the account
          example: Snippet Factory
        owneremail:
          type: string
          maxLength: 320
          format: email
          description: Email address of account owner
          example: admin@snippetfactory.com
        external_id:
          type: string
          maxLength: 255
          default: null
          nullable: true
          description: >-
            And identifier that can be used to reference and id from a different
            system
          example: d615396c40
        plan:
          type: object
          additionalProperties: true
          description: Billing plan and associated feature information pertaining
          properties:
            type:
              type: string
              minLength: 4
              maxLength: 50
              description: >-
                The new billing plan type to assign the target account once
                attached
              example: enterprise
        retention:
          type: integer
          minimum: 0
          maximum: 90
          format: int32
          description: Data retention policy information pertaining to the account
          example: 7
        enable_syslog:
          type: boolean
          default: false
          title: Enable Syslog Ingestion
          description: Enables syslog ingestion for the new account via custom ports.
        include_admins:
          type: boolean
          default: false
          title: Auto join all enterprise admins
          description: >-
            If true, all enterprise admins will be added as members of the child
            account
    validation-error:
      type: object
      title: Validation Error
      description: >-
        A normalized representation of an error that is returned from an http
        request

        in response to failed input validation
      properties:
        status:
          type: integer
          minimum: 300
          maximum: 599
          format: int32
          description: The HTTP status code the error is associated with
        context:
          type: string
          description: >-
            The portion of the inbound request which triggered the validation
            failure
          enum:
            - body
            - querystring
            - params
            - headers
        code:
          type: string
          maxLength: 35
          description: A textual classifier of the error or failure
        message:
          type: string
          maxLength: 200
          description: A message describing the nature of the error or failure
        errors:
          type: array
          maxItems: 200
          description: >-
            List of metadata objects describing validation failures or 
            contextual information
          items:
            $ref: '#/components/schemas/http-error-item'
      required:
        - status
        - code
        - message
    http-error:
      type: object
      title: HTTP Error
      description: >-
        A normalized representation of an error that is returned from an http
        request
      properties:
        status:
          type: integer
          minimum: 300
          maximum: 599
          format: int32
          description: The HTTP status code the error is associated with
        context:
          type: string
          description: >-
            The portion of the inbound request which triggered the validation
            failure
          enum:
            - body
            - querystring
            - params
            - headers
        code:
          type: string
          maxLength: 35
          description: A textual classifier of the error or failure
        message:
          type: string
          maxLength: 200
          description: A message describing the nature of the error or failure
        errors:
          type: array
          maxItems: 200
          description: >-
            List of metadata objects describing validation failures or 
            contextual information
          items:
            $ref: '#/components/schemas/http-error-item'
      required:
        - status
        - code
        - message
    account:
      type: object
      title: Account
      description: |-
        Represents a platform level account
        registration, authentication and authorization.
      properties:
        account_id:
          type: string
          maxLength: 24
          description: A value that uniquely identifies the account.
          example: 8aca3b99b4ee99db2c0fb6b7
        enterprise_id:
          type: string
          maxLength: 24
          description: >-
            A value that uniquely identifies the enterprise to which the account
            belongs.
          example: c0c41da6c8
        account:
          type: string
          maxLength: 20
          description: A shorthand identifier for the associated account
          example: b35eda6673
        company:
          type: string
          maxLength: 250
          description: Name of the company which owns the account
          example: Snippet Factory
        deactivated:
          type: string
          maxLength: 35
          format: date-time
          nullable: true
          description: Indicates if the account has been deactivated or not
        owneremail:
          type: string
          maxLength: 320
          format: email
          description: Email address of account owner
          example: admin@snippetfactory.com
        external_id:
          type: string
          maxLength: 255
          default: null
          nullable: true
          description: >-
            And identifier that can be used to reference and id from a different
            system
          example: d615396c40
        plan:
          type: object
          additionalProperties: true
          description: Billing plan and associated feature information pertaining
          properties:
            type:
              type: string
              minLength: 4
              maxLength: 50
              description: >-
                The new billing plan type to assign the target account once
                attached
              example: enterprise
        quota:
          type: object
          additionalProperties: true
          description: Quota information pertaining to the account
          properties:
            retention:
              type: integer
              minimum: 0
              maximum: 90
              format: int32
              description: Data retention policy information pertaining to the account
              example: 14
        retention:
          type: integer
          minimum: 0
          maximum: 90
          format: int32
          description: Data retention policy information pertaining to the account
        status:
          type: string
          enum:
            - active
            - deactivated
            - pending
          description: Indication the account's current activation state
        created:
          type: string
          maxLength: 35
          format: date-time
          description: Indicates when the account was created
        meta:
          type: object
          description: Metadata about the account
          additionalProperties: true
      required:
        - account_id
        - enterprise_id
    http-error-item:
      type: object
      title: HTTP Error Item
      additionalProperties: true
      properties:
        keyword:
          type: string
          maxLength: 30
          description: >-
            An indication of the type of rule or error that caused the request
            to fail
        instance_path:
          type: string
          maxLength: 200
          nullable: true
          default: null
          description: JSON Pointer to the location in the data instance
        schema_path:
          type: string
          maxLength: 200
          nullable: true
          default: null
          description: JSON Pointer to the location of the failing keyword in the schema
        params:
          type: object
          additionalProperties: true
          description: >-
            Additional information about the error that can be used to generate
            error messages
        property_name:
          type: string
          maxLength: 100
          nullable: true
          default: null
          description: Set for errors in `propertyNames` keyword schema
        message:
          type: string
          maxLength: 200
          description: A message describing the nature of the error or failure
      required:
        - keyword
        - params
        - message
  securitySchemes:
    AccessToken:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        The primary authentication method for the Mezmo API.


        Pass the key in the `Authorization` header in the format `Token <ACCESS
        TOKEN>`.

        For example:


        ```

        curl -H 'Authorization: Token <ACCESS TOKEN>'

        ```


        This key is used for all APIs with the exception of ingest.

````