> ## 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 requirement group for a phone number order



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/ordering.yml post /number_order_phone_numbers/{id}/requirement_group
openapi: 3.1.0
info:
  title: Telnyx Phone Number Ordering API
  version: 2.0.0
  description: API for ordering phone numbers.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /number_order_phone_numbers/{id}/requirement_group:
    post:
      tags:
        - Requirement Groups
      summary: Update requirement group for a phone number order
      operationId: updateNumberOrderPhoneNumberRequirementGroup
      parameters:
        - name: id
          in: path
          required: true
          description: The unique identifier of the number order phone number
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - requirement_group_id
              properties:
                requirement_group_id:
                  type: string
                  format: uuid
                  description: The ID of the requirement group to associate
      responses:
        '200':
          description: Successful response with updated phone number order details
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: >-
                      #/components/schemas/NumberOrderPhoneNumberRequirementGroupResponse
        '400':
          $ref: '#/components/responses/numbers_BadRequestResponse'
        '401':
          $ref: '#/components/responses/numbers_UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/numbers_NotFoundResponse'
        '422':
          $ref: '#/components/responses/numbers_UnprocessableEntity'
        '500':
          $ref: '#/components/responses/numbers_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 response = await
            client.numberOrderPhoneNumbers.updateRequirementGroup(
              '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              { requirement_group_id: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e' },
            );


            console.log(response.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
            )

            response =
            client.number_order_phone_numbers.update_requirement_group(
                id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
                requirement_group_id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
            )

            print(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\tresponse, err := client.NumberOrderPhoneNumbers.UpdateRequirementGroup(\n\t\tcontext.TODO(),\n\t\t\"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\ttelnyx.NumberOrderPhoneNumberUpdateRequirementGroupParams{\n\t\t\tRequirementGroupID: \"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", response.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.numberorderphonenumbers.NumberOrderPhoneNumberUpdateRequirementGroupParams;

            import
            com.telnyx.sdk.models.numberorderphonenumbers.NumberOrderPhoneNumberUpdateRequirementGroupResponse;


            public final class Main {
                private Main() {}

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

                    NumberOrderPhoneNumberUpdateRequirementGroupParams params = NumberOrderPhoneNumberUpdateRequirementGroupParams.builder()
                        .id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
                        .requirementGroupId("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
                        .build();
                    NumberOrderPhoneNumberUpdateRequirementGroupResponse response = client.numberOrderPhoneNumbers().updateRequirementGroup(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            response =
            telnyx.number_order_phone_numbers.update_requirement_group(
              "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
              requirement_group_id: "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
            )


            puts(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 {
              $response = $client->numberOrderPhoneNumbers->updateRequirementGroup(
                '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
                requirementGroupID: '182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e',
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx number-order-phone-numbers update-requirement-group \
              --api-key 'My API Key' \
              --id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
              --requirement-group-id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e
components:
  schemas:
    NumberOrderPhoneNumberRequirementGroupResponse:
      type: object
      properties:
        status:
          type: string
          example: pending
        order_request_id:
          type: string
          format: uuid
          example: a11d58fe-88a4-494a-b752-8dea411993c6
        country_code:
          type: string
          example: AT
        is_block_number:
          type: boolean
          example: false
        regulatory_requirements:
          type: array
          items:
            type: object
            properties:
              requirement_id:
                type: string
                format: uuid
              field_value:
                type: string
                example: '1234567890'
              field_type:
                type: string
                example: textual
              status:
                type: string
                example: pending-approval
        locality:
          type: string
          example: AUSTRIA
        phone_number_type:
          type: string
          example: toll_free
        bundle_id:
          type:
            - string
            - 'null'
          format: uuid
        sub_number_order_id:
          type: string
          format: uuid
          example: f826ed66-b27c-4340-9dc0-57dc3459f1bd
        deadline:
          type: string
          format: date-time
        requirements_status:
          type: string
          example: requirement-info-under-review
        id:
          type: string
          format: uuid
          example: 613d517a-0432-4bae-a785-c11033bd0985
        phone_number:
          type: string
          example: '+43800300238'
        requirements_met:
          type: boolean
          example: false
        record_type:
          type: string
          example: number_order_phone_number
    numbers_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/numbers_Error'
      type: object
    numbers_Error:
      properties:
        code:
          type: string
          example: '10007'
        title:
          type: string
          example: Unexpected error
        detail:
          type: string
          example: An unexpected error occured.
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
              example: /base
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
        meta:
          type: object
          properties:
            url:
              type: string
              description: URL with additional information on the error.
              example: https://developers.telnyx.com/docs/overview/errors/10015
      type: object
  responses:
    numbers_BadRequestResponse:
      description: >-
        Bad request, the request was unacceptable, often due to missing a
        required parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
    numbers_UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
          examples:
            Authentication Failed:
              value:
                errors:
                  - code: '10009'
                    title: Authentication failed
                    detail: Could not understand the provided credentials.
                    meta:
                      url: https://developers.telnyx.com/docs/overview/errors/10009
    numbers_NotFoundResponse:
      description: The requested resource doesn't exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
    numbers_UnprocessableEntity:
      description: Unprocessable entity. Check the 'detail' field in response for details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
    numbers_GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/numbers_Errors'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````