Community tags API

The tags API from Community — 4 operation(s) for tags.

OpenAPI Specification

community-tags-api-openapi.yml Raw ↑
openapi: 3.0.3
info:
  title: Async REST member-data tags API
  description: API for Community clients to manage their subscribers, send messages, and more.
  version: 0.1.0
  contact:
    email: saleseng@community.com
servers:
- url: https://{environment}.community.com/webhooks/{version}/community/{client_id}
  variables:
    environment:
      enum:
      - api
      default: api
    version:
      enum:
      - v1
      default: v1
    client_id:
      default: <client_id>
      description: Community Account's client_id
security:
- bearerAuth: []
- oAuth: []
tags:
- name: tags
paths:
  /tag_create:
    post:
      tags:
      - tags
      summary: Create a Subcommunity
      operationId: tag-create
      responses:
        '202':
          description: Accepted
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tag_create'
  /tag_delete:
    post:
      tags:
      - tags
      summary: Delete a Subcommunity
      description: You can either pass in the subcommunity ID (`tag_id`) or the `title`. If you provide both, `tag_id` takes precedence.
      operationId: tag-delete
      responses:
        '202':
          description: Accepted
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tag_delete'
  /tag_update:
    post:
      tags:
      - tags
      summary: Update a Subcommunity
      description: 'Similar as the tag_create operation, this will update the desired tag (Subcommunity), identified by the provided `tag_id`.


        This is a delta-update, i.e., omitted fields will not modify the Subcommunity. I.e.: If you only want to update the tag''s `title` but leave color and description the same, only pass the `tag_id` and the `title`, so that the rest will stay the same.'
      operationId: tag-update
      responses:
        '202':
          description: Accepted
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tag_update'
  /tag_keyword_modify:
    post:
      tags:
      - tags
      summary: Add / Remove keywords from Subcommunity
      description: You can either pass in the subcommunity ID (`tag_id`) or the `title`. If you provide both, `tag_id` takes precedence.
      operationId: tag-keyword-modify
      responses:
        '202':
          description: Accepted
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '403':
          description: Forbidden
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/tag_keyword_modify'
components:
  schemas:
    UUID:
      type: string
      format: uuid
    tag_create:
      type: object
      required:
      - title
      properties:
        title:
          $ref: '#/components/schemas/String60'
        description:
          $ref: '#/components/schemas/NonEmptyString'
        color:
          $ref: '#/components/schemas/RGBColor'
        keywords:
          type: array
          description: A list of keywords that will automatically add a member to this Subcommunity
          items:
            $ref: '#/components/schemas/String50'
    RGBColor:
      type: string
      pattern: ^#[A-Fa-f0-9]{6}$
    tag_title:
      type: object
      properties:
        title:
          $ref: '#/components/schemas/String60'
    tag_update:
      type: object
      required:
      - tag_id
      properties:
        tag_id:
          $ref: '#/components/schemas/UUID'
        title:
          $ref: '#/components/schemas/String60'
        description:
          $ref: '#/components/schemas/NonEmptyString'
        color:
          $ref: '#/components/schemas/RGBColor'
        keywords:
          type: array
          description: A list of keywords that will automatically add a member to this Subcommunity
          items:
            $ref: '#/components/schemas/String50'
    tag_delete:
      type: object
      anyOf:
      - $ref: '#/components/schemas/tag_id'
      - $ref: '#/components/schemas/tag_title'
    tag_keyword_modify:
      type: object
      required:
      - keyword
      - operation
      anyOf:
      - $ref: '#/components/schemas/tag_id'
      - $ref: '#/components/schemas/tag_title'
      properties:
        keyword:
          $ref: '#/components/schemas/String50'
        operation:
          type: string
          enum:
          - add
          - remove
    String60:
      type: string
      allOf:
      - $ref: '#/components/schemas/NonEmptyString'
      - maxLength: 60
    NonEmptyString:
      type: string
      pattern: \S
    tag_id:
      type: object
      properties:
        tag_id:
          $ref: '#/components/schemas/UUID'
    String50:
      type: string
      allOf:
      - $ref: '#/components/schemas/NonEmptyString'
      - maxLength: 50
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    oAuth:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://oauth-login.community.com/
          scopes: {}
          tokenUrl: /oauth/v1/token