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

# Adding Multiple Tags to Multiple Subscribers

> This endpoint applies multiple tags to multiple subscribers.

<Tip>
  Other uses
  You can also use this endpoint to mass remove tags from subscribers. For example if replace\_tags is true and your tags list is empty it will remove all tags from your numbers list
</Tip>

## Request URL

```http theme={null}
POST https://app.tatango.com/api/v2/lists/{ID}/bulk_taggings
```


## OpenAPI

````yaml POST /api/v2/lists/{ID}/bulk_taggings
openapi: 3.1.0
info:
  title: Tatango Legacy v2 API
  description: Tatango legacy v2 API endpoints for existing integrations.
  version: 2.0.0
servers:
  - url: https://app.tatango.com
security:
  - basicAuth: []
paths:
  /api/v2/lists/{ID}/bulk_taggings:
    post:
      tags:
        - Subscribers
      summary: Adding Multiple Tags to Multiple Subscribers
      description: This endpoint applies multiple tags to multiple subscribers.
      parameters:
        - name: ID
          in: path
          description: ID of the list
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/BulkTaggingRequest'
            example:
              bulk_tagging:
                phone_numbers:
                  - '2065551111'
                  - '2065551112'
                  - '2065551113'
                tags:
                  - vip
                  - customer
                  - newsletter
                replace_tags: false
      responses:
        '200':
          description: Bulk tagging operation completed
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BulkTaggingResponse'
              example:
                number_count: 3
                tag_count: 3
                subscribers_to_update: 2
                replace_tags: false
                not_subscribed:
                  - '2065551113'
                invalid_numbers: []
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >-
            curl "https://app.tatango.com/api/v2/lists/ID/bulk_taggings" -d
            '{"bulk_tagging":{"phone_numbers":["2065551111","2065551112"],"tags":["vip","customer"],"replace_tags":false}}'
            -X POST \
              -H "Accept: application/json" \
              -H "Content-Type: application/json" \
              -u emailaddress@mydomain.com:my_api_key \
              -H "Host: example.org" \
              -H "Cookie: "
        - lang: Ruby
          label: Ruby
          source: >-
            require 'net/http'

            require 'uri'


            uri =
            URI.parse('https://app.tatango.com/api/v2/lists/ID/bulk_taggings')

            http = Net::HTTP.new(uri.host, uri.port)

            request = Net::HTTP::Post.new(uri.request_url)

            request.basic_auth("emailaddress@mydomain.com", "my_api_key")

            request.body =
            {"bulk_tagging":{"phone_numbers":["2065551111","2065551112"],"tags":["vip","customer"],"replace_tags":false}}.to_json

            response = http.request(request)
        - lang: JavaScript
          label: JavaScript
          source: >-
            var request = new XMLHttpRequest();

            request.open('POST',
            'https://app.tatango.com/api/v2/lists/ID/bulk_taggings', false);

            request.setRequestHeader('Content-Type', 'application/json');

            request.setRequestHeader('Authorization', 'Basic ' +
            btoa('emailaddress@mydomain.com:my_api_key'));

            var data = JSON.stringify({ bulk_tagging: { phone_numbers:
            ['2065551111', '2065551112'], tags: ['vip', 'customer'],
            replace_tags: false } });

            request.send(data);
components:
  schemas:
    BulkTaggingRequest:
      type: object
      properties:
        bulk_tagging:
          type: object
          properties:
            phone_numbers:
              type: array
              items:
                type: string
              description: >-
                Array of phone numbers you want to modify. The max length of
                this array is 1000 values
              maxItems: 1000
              example:
                - '2065551111'
                - '2065551112'
                - '2065551113'
            tags:
              type: array
              items:
                type: string
              description: >-
                (optional) Array of tags to add. The max length of this array is
                50 values
              maxItems: 50
              example:
                - vip
                - customer
                - newsletter
            replace_tags:
              type: boolean
              description: >-
                (optional) Boolean value to replace tags. If it is true it will
                replace the old tags with the new tags. This value defaults to
                false if not defined
              default: false
              example: false
          required:
            - phone_numbers
      required:
        - bulk_tagging
    BulkTaggingResponse:
      type: object
      properties:
        number_count:
          type: integer
          description: The number of phone numbers in your passed phone_numbers list
          example: 3
        tag_count:
          type: integer
          description: The number of tags in your passed tags list
          example: 3
        subscribers_to_update:
          type: integer
          description: >-
            The number of subscribed members to your list that will be updated
            with the new tags
          example: 2
        replace_tags:
          type: boolean
          description: >-
            If true all the tags for subscribers will be replaced with the new
            tags. If false it will add the new tags to the old tags
          example: false
        not_subscribed:
          type: array
          items:
            type: string
          description: >-
            A list of phone numbers that were passed that are not subscribed to
            the defined list. If all numbers are subscribed this will not be
            displayed
          example:
            - '2065551113'
        invalid_numbers:
          type: array
          items:
            type: string
          description: >-
            A list of phone numbers that were passed in that are not valid phone
            numbers. An invalid number will also consist of landline phones. If
            all numbers are valid this will not be displayed
          example: []
      required:
        - number_count
        - tag_count
        - subscribers_to_update
        - replace_tags
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Tatango authenticates API requests by validating an API key passed via
        HTTP Basic Authentication. Use your login email as the username and your
        API key as the password.

````