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

# Update Auto-Response Setting



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/messaging/profiles.yml put /messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}
openapi: 3.1.0
info:
  title: Telnyx Messaging Profiles API
  version: 2.0.0
  description: API for messaging profiles and auto-response configurations.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /messaging_profiles/{profile_id}/autoresp_configs/{autoresp_cfg_id}:
    put:
      tags:
        - Opt-Out Management
      summary: Update Auto-Response Setting
      operationId: UpdateAutoRespConfig
      parameters:
        - required: true
          schema:
            title: Profile Id
            type: string
            format: uuid
          name: profile_id
          in: path
        - required: true
          schema:
            title: Autoresp Cfg Id
            type: string
            format: uuid
          name: autoresp_cfg_id
          in: path
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AutoRespConfigCreateSchema'
        required: true
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AutorespConfigResponseSchema'
              example:
                data:
                  op: start
                  keywords:
                    - START
                    - BEGIN
                  resp_text: Hello there!
                  country_code: '*'
                  id: 54b7e19f-98a8-416f-81d1-a2782eade48b
                  created_at: '2023-03-10T21:54:46.293380+00:00'
                  updated_at: '2023-03-10T21:54:46.293380+00:00'
        4XX:
          $ref: '#/components/responses/messaging_GenericErrorResponse'
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Telnyx from 'telnyx';


            const client = new Telnyx({
              apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
            });


            const autoRespConfigResponse = await
            client.messagingProfiles.autorespConfigs.update(
              '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              {
                profile_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                country_code: 'US',
                keywords: ['keyword1', 'keyword2'],
                op: 'start',
              },
            );


            console.log(autoRespConfigResponse.data);
        - lang: Python
          source: >-
            import os

            from telnyx import Telnyx


            client = Telnyx(
                api_key=os.environ.get("TELNYX_API_KEY"),  # This is the default and can be omitted
            )

            auto_resp_config_response =
            client.messaging_profiles.autoresp_configs.update(
                autoresp_cfg_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                profile_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                country_code="US",
                keywords=["keyword1", "keyword2"],
                op="start",
            )

            print(auto_resp_config_response.data)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/team-telnyx/telnyx-go\"\n\t\"github.com/team-telnyx/telnyx-go/option\"\n)\n\nfunc main() {\n\tclient := telnyx.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tautoRespConfigResponse, err := client.MessagingProfiles.AutorespConfigs.Update(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\ttelnyx.MessagingProfileAutorespConfigUpdateParams{\n\t\t\tProfileID: \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\t\tAutoRespConfigCreate: telnyx.AutoRespConfigCreateParam{\n\t\t\t\tCountryCode: \"US\",\n\t\t\t\tKeywords:    []string{\"keyword1\", \"keyword2\"},\n\t\t\t\tOp:          telnyx.AutoRespConfigCreateOpStart,\n\t\t\t},\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", autoRespConfigResponse.Data)\n}\n"
        - lang: Java
          source: >-
            package com.telnyx.sdk.example;


            import com.telnyx.sdk.client.TelnyxClient;

            import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;

            import
            com.telnyx.sdk.models.messagingprofiles.autorespconfigs.AutoRespConfigCreate;

            import
            com.telnyx.sdk.models.messagingprofiles.autorespconfigs.AutoRespConfigResponse;

            import
            com.telnyx.sdk.models.messagingprofiles.autorespconfigs.AutorespConfigUpdateParams;


            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    TelnyxClient client = TelnyxOkHttpClient.fromEnv();

                    AutorespConfigUpdateParams params = AutorespConfigUpdateParams.builder()
                        .profileId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
                        .autorespCfgId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
                        .autoRespConfigCreate(AutoRespConfigCreate.builder()
                            .countryCode("US")
                            .addKeyword("keyword1")
                            .addKeyword("keyword2")
                            .op(AutoRespConfigCreate.Op.START)
                            .build())
                        .build();
                    AutoRespConfigResponse autoRespConfigResponse = client.messagingProfiles().autorespConfigs().update(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


            telnyx = Telnyx::Client.new(api_key: "My API Key")


            auto_resp_config_response =
            telnyx.messaging_profiles.autoresp_configs.update(
              "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              profile_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              country_code: "US",
              keywords: ["keyword1", "keyword2"],
              op: :start
            )


            puts(auto_resp_config_response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Telnyx\Client;

            use Telnyx\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('TELNYX_API_KEY') ?: 'My API
            Key');


            try {
              $autoRespConfigResponse = $client->messagingProfiles->autorespConfigs->update(
                '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                profileID: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                countryCode: 'US',
                keywords: ['keyword1', 'keyword2'],
                op: 'start',
                respText: 'Thank you for your message',
              );

              var_dump($autoRespConfigResponse);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx messaging-profiles:autoresp-configs update \
              --api-key 'My API Key' \
              --profile-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --autoresp-cfg-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --country-code US \
              --keyword keyword1 \
              --keyword keyword2 \
              --op start
components:
  schemas:
    AutoRespConfigCreateSchema:
      title: AutoRespConfigCreateSchema
      required:
        - op
        - keywords
        - country_code
      type: object
      properties:
        op:
          title: Op
          enum:
            - start
            - stop
            - info
          type: string
        keywords:
          title: Keywords
          type: array
          items:
            type: string
          example:
            - keyword1
            - keyword2
        resp_text:
          title: Resp Text
          type: string
          example: Thank you for your message
        country_code:
          title: Country Code
          type: string
          example: US
    AutorespConfigResponseSchema:
      title: AutorespConfigResponseSchema
      required:
        - data
      type: object
      properties:
        data:
          $ref: '#/components/schemas/AutorespConfigSchema'
    AutorespConfigSchema:
      title: AutorespConfigSchema
      required:
        - op
        - keywords
        - country_code
        - id
        - created_at
        - updated_at
      type: object
      properties:
        op:
          title: Op
          enum:
            - start
            - stop
            - info
          type: string
          example: start
        keywords:
          title: Keywords
          type: array
          items:
            type: string
          example:
            - START
            - BEGIN
        resp_text:
          title: Resp Text
          type: string
          example: Thank you for subscribing to our service.
        country_code:
          title: Country Code
          type: string
          example: '*'
        id:
          title: Id
          type: string
          example: b8f9c1c0-5b5a-4b1e-8c1c-0b5a4b1e8c1c
        created_at:
          title: Created At
          type: string
          format: date-time
        updated_at:
          title: Updated At
          type: string
          format: date-time
    messaging_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/messaging_Error'
    messaging_Error:
      required:
        - code
        - title
      properties:
        code:
          type: string
          x-format: integer
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
              format: json-pointer
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
  responses:
    messaging_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/messaging_Errors'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````