Encharge Tags Management API

The Tags Management API from Encharge — 5 operation(s) for the account tag registry and tag counts.

OpenAPI Specification

encharge-tags-management-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: 1.0.0
  title: Encharge Tags Management API
  description: The Encharge.io API
  license:
    name: MIT
  contact:
    url: https://help.encharge.io
    name: unknown
servers:
- url: https://api.encharge.io/v1
tags:
- name: Tags-Management
paths:
  /tags-management:
    get:
      operationId: GetAccountTags
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                properties:
                  tags:
                    items:
                      $ref: '#/components/schemas/Tag'
                    type: array
                required:
                - tags
                type: object
      description: Get all tags.
      tags:
      - Tags-Management
      security:
      - oauth2: []
      parameters: []
    post:
      operationId: CreateAccountTags
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                properties:
                  tags:
                    items:
                      $ref: '#/components/schemas/Tag'
                    type: array
                required:
                - tags
                type: object
      description: Create new tags.
      tags:
      - Tags-Management
      security:
      - oauth2: []
      parameters: []
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                tags:
                  items:
                    $ref: '#/components/schemas/Tag'
                  type: array
                  description: Tag(s) to add.
              required:
              - tags
              type: object
  /tags-management/counts:
    get:
      operationId: GetTagCounts
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                properties:
                  tagCounts:
                    items:
                      properties:
                        count:
                          type: number
                          format: double
                        tag:
                          type: string
                      required:
                      - count
                      - tag
                      type: object
                    type: array
                required:
                - tagCounts
                type: object
      description: Get all tags (with count of people tagged).
      tags:
      - Tags-Management
      security:
      - oauth2: []
      parameters: []
  /tags-management/{tag}:
    patch:
      operationId: UpdateAccountTag
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema:
                properties:
                  tag:
                    $ref: '#/components/schemas/Tag'
                required:
                - tag
                type: object
      description: Update tag. If changing the name of the tag, it will be updated across all flows, segments and people.
      tags:
      - Tags-Management
      security:
      - oauth2:
        - account:write
      parameters:
      - in: path
        name: tag
        required: true
        schema:
          type: string
      requestBody:
        description: Update existing tag
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Tag'
              description: Update existing tag
    delete:
      operationId: DeleteAccountTag
      responses:
        '204':
          description: Deleted
      description: Delete tag from current account. Deleting a tag removes it from all people in the account.
      tags:
      - Tags-Management
      security:
      - oauth2:
        - account:write
      parameters:
      - in: path
        name: tag
        required: true
        schema:
          type: string
components:
  schemas:
    Tag:
      properties:
        color:
          type: string
        count:
          type: number
          format: double
        createdAt:
          type: string
          format: date-time
        description:
          type: string
        tag:
          type: string
      required:
      - tag
      type: object
  securitySchemes:
    apiKeyHeader:
      description: "You can use API key authentication if you are using the API for your Encharge account. If you are building an app for others to use, please use the OAuth2 authentication below. Find your API key from https://app.encharge.io/account/info . \n\n While all operations in the API specify oauth2 security, instead you can use an API key in the header or query string."
      type: apiKey
      in: header
      name: X-Encharge-Token
    apiKeyQuery:
      description: "You can use API key authentication if you are using the API for your Encharge account. \n\nIf you are building an app for others to use, please use the OAuth2 authentication below. Find your API key from https://app.encharge.io/account/info \n\n While all operations in the API specify oauth2 security, instead you can use an API key in the header or query string."
      type: apiKey
      in: query
      name: token
    oauth2:
      type: oauth2
      description: "The Encharge API uses OAuth 2 with the authorization code flow. \n\nGet for your OAuth credentials (Client ID and Client Secret) by filling out [this form](https://research.typeform.com/to/I680YtLA)."
      flows:
        authorizationCode:
          authorizationUrl: https://api.encharge.io/v1/oauth/authorize
          tokenUrl: https://api.encharge.io/v1/oauth/token
          refreshUrl: https://api.encharge.io/v1/oauth/token
          scopes: {}