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

# Configure List Opt-In Type

> This endpoint configures an opt-in type for a list.

## Request URL

```http theme={null}
PUT https://app.tatango.com/api/v2/lists/<ID>/opt_in_settings
```


## OpenAPI

````yaml PUT /api/v2/lists/{ID}/opt_in_settings
openapi: 3.1.0
info:
  title: momoGood Messaging API v2
  description: >-
    The platform management API for momoGood Messaging (formerly the Tatango v2
    API). Manage lists, subscribers, custom fields, tags, webhooks, shortcodes,
    MOMT reports, and scheduled broadcasts from a single REST surface.
  version: 2.0.0
servers:
  - url: https://app.tatango.com
security:
  - basicAuth: []
paths:
  /api/v2/lists/{ID}/opt_in_settings:
    put:
      tags:
        - Lists
      summary: Configure List Opt-In Type
      description: This endpoint configures an opt-in type for a list.
      parameters:
        - name: ID
          in: path
          description: The ID of the list to change.
          required: true
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/OptInSettingsUpdate'
            example:
              opt_in_type: double
              opt_in_requests: []
      responses:
        '200':
          description: Opt-in settings updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OptInSettingsResponse'
              example:
                status: Opt in settings updated
                opt_in_type: double
                opt_in_requests:
                  - bypass_opt_in_response: false
                    collected_data: zip_code
                    created_at: '2016-09-07T14:10:41-07:00'
                    follow_up: true
                    follow_up_hour: 2
                    id: 1
                    list_id: 10
                    no_response_message: >-
                      Reply with zip code for recurring autodialed SMS/MMS
                      marketing msgs. No purchase rqd. Msg&data rates may apply.
                      Terms apply 12345-info.com
                    opt_in_message: null
                    request_message: >-
                      Reply with zip code for recurring autodialed SMS/MMS
                      marketing msgs. No purchase rqd. Msg&data rates may apply.
                      Terms apply 12345-info.com
                    retry_message: >-
                      Incorrect zip code. Reply with zip code for recurring
                      autodialed SMS/MMS marketing msgs. No purchase rqd.
                      Msg&data rates may apply. Terms apply 12345-info.com
                    second_opt_in_message: null
                    success_action: nextrequest
                    updated_at: '2016-09-07T14:10:41-07:00'
                  - bypass_opt_in_response: false
                    collected_data: email_address
                    created_at: '2016-09-07T14:10:41-07:00'
                    follow_up: true
                    follow_up_hour: 2
                    id: 2
                    list_id: 10
                    no_response_message: >-
                      Reply with email address for recurring autodialed SMS/MMS
                      marketing msgs. No purchase rqd. Msg&data rates may apply.
                      Terms apply 12345-info.com
                    opt_in_message: null
                    request_message: >-
                      Thank you! Reply with email address for recurring
                      autodialed SMS/MMS marketing msgs. No purchase rqd.
                      Msg&data rates may apply. Terms apply 12345-info.com
                    retry_message: >-
                      Incorrect email. Reply with email address for recurring
                      autodialed SMS/MMS marketing msgs. No purchase rqd.
                      Msg&data rates may apply. Terms apply 12345-info.com
                    second_opt_in_message: null
                    success_action: nextrequest
                    updated_at: '2016-09-07T14:10:41-07:00'
                  - bypass_opt_in_response: false
                    collected_data: first_name
                    created_at: '2016-09-07T14:10:41-07:00'
                    follow_up: true
                    follow_up_hour: 2
                    id: 3
                    list_id: 10
                    no_response_message: >-
                      Reply with your first name for recurring autodialed
                      SMS/MMS marketing msgs. No purchase rqd. Msg&data rates
                      may apply. Terms apply 12345-info.com
                    opt_in_message: null
                    request_message: >-
                      Thank you! Reply with first name for recurring autodialed
                      SMS/MMS marketing msgs. No purchase rqd. Msg&data rates
                      may apply. Terms apply 12345-info.com
                    retry_message: >-
                      Incorrect name. Reply with your first name for recurring
                      autodialed SMS/MMS marketing msgs. No purchase rqd.
                      Msg&data rates may apply. Terms apply 12345-info.com
                    second_opt_in_message: null
                    success_action: nextrequest
                    updated_at: '2016-09-07T14:10:41-07:00'
                  - bypass_opt_in_response: false
                    collected_data: 'yes'
                    created_at: '2016-09-07T14:10:41-07:00'
                    follow_up: true
                    follow_up_hour: 2
                    id: 4
                    list_id: 10
                    no_response_message: null
                    opt_in_message: >-
                      ACME Retail: You agreed to receive recurring SMS/MMS msgs.
                      Txt STOP 2 end, HELP 4 help. Msg&data rates may apply.
                      Terms apply 12345-info.com
                    request_message: >-
                      Thank you! Reply YES for recurring autodialed SMS/MMS
                      marketing msgs. No purchase rqd. Msg&data rates may apply.
                      Terms apply 12345-info.com
                    retry_message: >-
                      Response not understood. Reply YES for recurring
                      autodialed SMS/MMS marketing msgs. No purchase rqd.
                      Msg&data rates may apply. Terms apply 12345-info.com
                    second_opt_in_message: >-
                      ACME Retail: Welcome back! You agreed to receive recurring
                      SMS/MMS msgs. Txt STOP 2 end, HELP 4 help. Msg&data rates
                      may apply. Terms apply 12345-info.com
                    success_action: optinsubscriber
                    updated_at: '2016-09-07T14:10:41-07:00'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >-
            curl "https://app.tatango.com/api/v2/lists/<ID>/opt_in_settings" -d
            '{"opt_in_type":"double","opt_in_requests":[{"collected_data":"zip_code","request_message":"Reply
            with zip code for recurring autodialed SMS/MMS marketing msgs. No
            purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","retry_message":"Incorrect zip code. Reply with zip
            code for recurring autodialed SMS/MMS marketing msgs. No purchase
            rqd. Msg&data rates may apply. Terms apply
            12345-info.com","follow_up":true,"follow_up_hour":2,"no_response_message":"Reply
            with zip code for recurring autodialed SMS/MMS marketing msgs. No
            purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","opt_in_message":null,"second_opt_in_message":null,"success_action":"nextrequest"},{"collected_data":"email_address","request_message":"Thank
            you! Reply with email address for recurring autodialed SMS/MMS
            marketing msgs. No purchase rqd. Msg&data rates may apply. Terms
            apply 12345-info.com","retry_message":"Incorrect email. Reply with
            email address for recurring autodialed SMS/MMS marketing msgs. No
            purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","follow_up":true,"follow_up_hour":24,"no_response_message":"Reply
            with email address for recurring autodialed SMS/MMS marketing msgs.
            No purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","opt_in_message":null,"second_opt_in_message":null,"success_action":"nextrequest"},{"collected_data":"first_name","request_message":"Thank
            you! Reply with first name for recurring autodialed SMS/MMS
            marketing msgs. No purchase rqd. Msg&data rates may apply. Terms
            apply 12345-info.com","retry_message":"Incorrect name. Reply with
            your first name for recurring autodialed SMS/MMS marketing msgs. No
            purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","follow_up":true,"follow_up_hour":24,"no_response_message":"Reply
            with your first name for recurring autodialed SMS/MMS marketing
            msgs. No purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","opt_in_message":null,"second_opt_in_message":null,"success_action":"nextrequest"},{"collected_data":"yes","request_message":"Thank
            you! Reply YES for recurring autodialed SMS/MMS marketing msgs. No
            purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","retry_message":"Response not understood. Reply YES
            for recurring autodialed SMS/MMS marketing msgs. No purchase rqd.
            Msg&data rates may apply. Terms apply
            12345-info.com","follow_up":false,"follow_up_hour":null,"opt_in_message":"ACME
            Retail: You agreed to receive recurring SMS/MMS msgs. Txt STOP 2
            end, HELP 4 help. Msg&data rates may apply. Terms apply
            12345-info.com","second_opt_in_message":"ACME Retail: Welcome back!
            You agreed to receive recurring SMS/MMS msgs. Txt STOP 2 end, HELP 4
            help. Msg&data rates may apply. Terms apply
            12345-info.com","success_action":"optinsubscriber"}]}' -X PUT \
              -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'\nrequire 'uri'\n\nuri =
            URI.parse('https://app.tatango.com/api/v2/lists/<ID>/opt_in_settings')

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

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

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

            request.body({"opt_in_type":"double","opt_in_requests":[{"collected_data":"zip_code","request_message":"Reply
            with zip code for recurring autodialed SMS/MMS marketing msgs. No
            purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","retry_message":"Incorrect zip code. Reply with zip
            code for recurring autodialed SMS/MMS marketing msgs. No purchase
            rqd. Msg&data rates may apply. Terms apply
            12345-info.com","follow_up":true,"follow_up_hour":2,"no_response_message":"Reply
            with zip code for recurring autodialed SMS/MMS marketing msgs. No
            purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","opt_in_message":null,"second_opt_in_message":null,"success_action":"nextrequest"},{"collected_data":"email_address","request_message":"Thank
            you! Reply with email address for recurring autodialed SMS/MMS
            marketing msgs. No purchase rqd. Msg&data rates may apply. Terms
            apply 12345-info.com","retry_message":"Incorrect email. Reply with
            email address for recurring autodialed SMS/MMS marketing msgs. No
            purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","follow_up":true,"follow_up_hour":24,"no_response_message":"Reply
            with email address for recurring autodialed SMS/MMS marketing msgs.
            No purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","opt_in_message":null,"second_opt_in_message":null,"success_action":"nextrequest"},{"collected_data":"first_name","request_message":"Thank
            you! Reply with first name for recurring autodialed SMS/MMS
            marketing msgs. No purchase rqd. Msg&data rates may apply. Terms
            apply 12345-info.com","retry_message":"Incorrect name. Reply with
            your first name for recurring autodialed SMS/MMS marketing msgs. No
            purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","follow_up":true,"follow_up_hour":24,"no_response_message":"Reply
            with your first name for recurring autodialed SMS/MMS marketing
            msgs. No purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","opt_in_message":null,"second_opt_in_message":null,"success_action":"nextrequest"},{"collected_data":"yes","request_message":"Thank
            you! Reply YES for recurring autodialed SMS/MMS marketing msgs. No
            purchase rqd. Msg&data rates may apply. Terms apply
            12345-info.com","retry_message":"Response not understood. Reply YES
            for recurring autodialed SMS/MMS marketing msgs. No purchase rqd.
            Msg&data rates may apply. Terms apply
            12345-info.com","follow_up":false,"follow_up_hour":null,"opt_in_message":"ACME
            Retail: You agreed to receive recurring SMS/MMS msgs. Txt STOP 2
            end, HELP 4 help. Msg&data rates may apply. Terms apply
            12345-info.com","second_opt_in_message":"ACME Retail: Welcome back!
            You agreed to receive recurring SMS/MMS msgs. Txt STOP 2 end, HELP 4
            help. Msg&data rates may apply. Terms apply
            12345-info.com","success_action":"optinsubscriber"}]} )

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

            request.open('PUT',
            'https://app.tatango.com/api/v2/lists/<ID>/opt_in_settings', false);

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

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

            var data = JSON.stringify({
              opt_in_type: 'double',
              opt_in_requests: [
                {
                  collected_data: 'zip_code',
                  request_message: 'Reply with zip code for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com',
                  retry_message: 'Incorrect zip code. Reply with zip code for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com',
                  follow_up: true,
                  follow_up_hour: 2,
                  no_response_message: 'Reply with zip code for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com',
                  opt_in_message: null,
                  second_opt_in_message: null,
                  success_action: 'nextrequest'
                },
                {
                  collected_data: 'email_address',
                  request_message: 'Thank you! Reply with email address for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com',
                  retry_message: 'Incorrect email. Reply with email address for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com',
                  follow_up: true,
                  follow_up_hour: 24,
                  no_response_message: 'Reply with email address for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com',
                  opt_in_message: null,
                  second_opt_in_message: null,
                  success_action: 'nextrequest'
                },
                {
                  collected_data: 'first_name',
                  request_message: 'Thank you! Reply with first name for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com',
                  retry_message: 'Incorrect name. Reply with your first name for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com',
                  follow_up: true,
                  follow_up_hour: 24,
                  no_response_message: 'Reply with your first name for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com',
                  opt_in_message: null,
                  second_opt_in_message: null,
                  success_action: 'nextrequest'
                },
                {
                  collected_data: 'yes',
                  request_message: 'Thank you! Reply YES for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com',
                  retry_message: 'Response not understood. Reply YES for recurring autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply. Terms apply 12345-info.com',
                  follow_up: false,
                  follow_up_hour: null,
                  opt_in_message: 'ACME Retail: You agreed to receive recurring SMS/MMS msgs. Txt STOP 2 end, HELP 4 help. Msg&data rates may apply. Terms apply 12345-info.com',
                  second_opt_in_message: 'ACME Retail: Welcome back! You agreed to receive recurring SMS/MMS msgs. Txt STOP 2 end, HELP 4 help. Msg&data rates may apply. Terms apply 12345-info.com',
                  success_action: 'optinsubscriber'
                }
              ]
            });

            request.send(data);
components:
  schemas:
    OptInSettingsUpdate:
      type: object
      properties:
        bypass_opt_in_response:
          type: boolean
          description: >-
            If this is set to true, then the usual "first_optin_message" or
            "second_optin_message" that momoGood sends when someone completes
            the opt-in process for a list, is not sent. Customers may use this
            functionality if they prefer to use a scheduled after opt-in message
            to welcome subscribers, rather than the "first_optin_message" or
            "second_optin_message".
        opt_in_type:
          type: string
          enum:
            - single
            - double
          description: >-
            Opt in type (may be either "single" or "double") "single" - This
            opt-in type is used when you want the user to subscribe to a
            designated list by simply texting your opt-in keyword to your
            shortcode."double" - This opt-in type is used when you want the user
            to provide you additional information such as email, name, zip
            codes, etc., after texting your opt-in keyword to your shortcode,
            but before subscribing them to a designated list.
        first_optin_message:
          type:
            - string
            - 'null'
          description: >-
            This message is sent to a phone number after they've succesfully
            completed the single opt-in process for a specific list, and at no
            point in the past has been subscribed to the list. (only used with
            single opt-ins)


            Example Message: "ACME Retail: You agreed to receive recurring
            SMS/MMS msgs. Txt STOP 2 end, HELP 4 help. Msg&data rates may apply.
            Terms apply 12345-info.com"
        second_optin_message:
          type:
            - string
            - 'null'
          description: >-
            This message is sent to a phone number after they've succesfully
            completed the single opt-in process for a specific list, and at some
            point in the past has been subscribed to the list. This happens when
            a phone number opts-in, opts-out, then opts-in again. (only used
            with single opt-ins)


            Example Message: "ACME Retail: Welcome back! You agreed to receive
            recurring SMS/MMS msgs. Txt STOP 2 end, HELP 4 help. Msg&data rates
            may apply. Terms apply 12345-info.com"
        opt_in_requests:
          type: array
          description: >-
            Array of opt-in requests, which designate the type of information
            you'd like a phone number to respond to the message
            [request_message] with. (only used with double opt-ins)
          items:
            $ref: '#/components/schemas/OptInRequest'
      required:
        - opt_in_type
    OptInSettingsResponse:
      type: object
      properties:
        status:
          type: string
          example: Opt in settings updated
        opt_in_type:
          type: string
          enum:
            - single
            - double
          example: double
        opt_in_requests:
          type: array
          items:
            $ref: '#/components/schemas/OptInRequestResponse'
      required:
        - status
        - opt_in_type
        - opt_in_requests
    OptInRequest:
      type: object
      properties:
        collected_data:
          type: string
          enum:
            - zip_code
            - email_address
            - first_name
            - 'yes'
          description: Type of data to collect.
        request_message:
          type: string
          description: >-
            This message is received by a phone number after they text your
            opt-in keyword, and the opt_in_type is set as "double". It's
            critical in this message that you ask the user to respond back with
            whatever information you've set in [collected_data].


            Example Message: "ACME Retail: Reply YES for recurring autodialed
            SMS/MMS marketing msgs. No purchase rqd. Msg&data rates may apply.
            Terms apply 12345-info.com"
        retry_message:
          type:
            - string
            - 'null'
          description: >-
            If a phone number's response to the message `request_message` isn't
            valid, based on the information you're trying to collect based on
            [collected_data], this is the message that will be sent back in
            response.


            Example Message: "Response not understood. Reply YES for recurring
            autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates
            may apply. Terms apply 12345-info.com"
        follow_up:
          type: boolean
          description: >-
            If a phone number doesn't respond to [request_message], you have the
            option of sending a follow up message, which is
            [no_response_message], to re-request the information you're asking
            them for. (may be either "true" or "false")
        follow_up_hour:
          type:
            - integer
            - 'null'
          minimum: 1
          maximum: 24
          description: >-
            If `follow_up` is "true" it's required that you set an amount of
            hours to have momoGood follow up with a phone number, if they don't
            respond to the [request_message]. The message that is sent to follow
            up, is [no_response_message].
        no_response_message:
          type:
            - string
            - 'null'
          description: >-
            This is the message sent to a phone number that doesn't respond to
            [request_message] after the amount of hours designated with
            [follow_up_hour], to re-request the information you're asking them
            for. (only used if [follow_up] is "true")


            Example Message: "No response received. Reply YES for recurring
            autodialed SMS/MMS marketing msgs. No purchase rqd. Msg&data rates
            may apply. Terms apply 12345-info.com."
        success_action:
          type: string
          enum:
            - nextrequest
            - optinsubscriber
          description: >-
            Use either "nextrequest" or "optinsubscriber".


            "nextrequest" - This option allows you to collect additional
            information from a user, before subscribing them to a designated
            list.


            "optinsubscriber" - This option ends the opt-in process, and
            subscribes the user to a designated list. (Required on last opt-in
            request)
        opt_in_message:
          type:
            - string
            - 'null'
          description: >-
            This message is sent to a phone number after they've succesfully
            completed the double opt-in process for a specific list, and at no
            point in the past has been subscribed to the list. (only used with
            double opt-ins)


            Example Message: "ACME Retail: You agreed to receive recurring
            SMS/MMS msgs. Txt STOP 2 end, HELP 4 help. Msg&data rates may apply.
            Terms apply 12345-info.com"
        second_opt_in_message:
          type:
            - string
            - 'null'
          description: >-
            This message is sent to a phone number after they've succesfully
            completed the double opt-in process for a specific list, and at some
            point in the past has been subscribed to the list. This happens when
            a phone number opts-in, opts-out, then opts-in again. (only used
            with double opt-ins)


            Example Message: "ACME Retail: Welcome back! You agreed to receive
            recurring SMS/MMS msgs. Txt STOP 2 end, HELP 4 help. Msg&data rates
            may apply. Terms apply 12345-info.com"
      required:
        - collected_data
        - request_message
        - success_action
        - follow_up
      oneOf:
        - properties:
            follow_up:
              const: true
          required:
            - follow_up_hour
            - no_response_message
        - properties:
            follow_up:
              const: false
    OptInRequestResponse:
      allOf:
        - $ref: '#/components/schemas/OptInRequest'
        - type: object
          properties:
            id:
              type: integer
              example: 1
            list_id:
              type: integer
              example: 5555
            created_at:
              type: string
              format: date-time
              example: '2025-01-01T00:00:00Z'
            updated_at:
              type: string
              format: date-time
              example: '2025-01-01T00:00:00Z'
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        The momoGood Messaging API v2 authenticates 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.

````