> ## 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.

# Fulfill an action requirement for a sub number order

> Submits the end user's details to the external verification provider and returns the requirement action. Australia mobile ID verification is currently the only action requirement. It generates a unique Onfido verification link, returned in `requirement_action.value`, which you share with the end user. The end user's `first_name` and `last_name` must be nested inside a `requirement` object; sending them at the top level is rejected.



## OpenAPI

````yaml /openapi/source/external/numbers/numbers.json post /external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}
openapi: 3.1.0
info:
  x-latency-category: responsive
  x-endpoint-cost: light
  version: 2.0.0
  title: Telnyx API
  description: SIP trunking, SMS, MMS, Call Control and Telephony Data Services.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
    description: Version 2.0.0 of the Telnyx API
security:
  - bearerAuth: []
tags:
  - name: Phone Number Search
    description: Number search
  - name: Phone Number Reservations
    description: Number reservations
  - name: Phone Number Orders
    description: Number orders
  - name: Inexplicit Number Orders
    description: >-
      Inexplicit number orders for bulk purchasing without specifying exact
      numbers
  - name: Phone Number Order Documents
    description: Number order documents
  - name: Phone Number Configurations
    description: Configure your phone numbers
  - name: Bulk Phone Number Operations
    description: Background jobs performed over a batch of phone numbers
  - name: Inventory Level
    description: Inventory Level
  - name: Phone Number Blocks Background Jobs
    description: Background jobs performed over a phone-numbers block's phone numbers
  - name: Regulatory Requirements
    description: Regulatory Requirements
  - name: Requirement Groups
    description: Requirement Groups
  - name: Country Coverage
    description: Country Coverage
  - name: Callbacks
    description: Callbacks
paths:
  /external_requirements/{regulatory_requirement_id}/sub_number_orders/{sub_number_order_id}:
    post:
      tags:
        - Requirement Groups
      summary: Fulfill an action requirement for a sub number order
      description: >-
        Submits the end user's details to the external verification provider and
        returns the requirement action. Australia mobile ID verification is
        currently the only action requirement. It generates a unique Onfido
        verification link, returned in `requirement_action.value`, which you
        share with the end user. The end user's `first_name` and `last_name`
        must be nested inside a `requirement` object; sending them at the top
        level is rejected.
      operationId: createExternalRequirement
      parameters:
        - name: regulatory_requirement_id
          in: path
          required: true
          description: >-
            The ID of the regulatory (action) requirement. For Australia mobile
            ID verification this is `b7c72fb8-fa08-4529-aaf6-b9117d3f3698`.
          schema:
            type: string
            format: uuid
        - name: sub_number_order_id
          in: path
          required: true
          description: The ID of the sub number order the requirement belongs to.
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - requirement
              properties:
                requirement:
                  type: object
                  description: >-
                    The end user's identity details for the action requirement.
                    Australia mobile ID verification is currently the only
                    action requirement. It requires `first_name` and
                    `last_name`, the same fields the corresponding GET lists in
                    `fields_required`.
                  required:
                    - first_name
                    - last_name
                  properties:
                    first_name:
                      type: string
                      description: The end user's first name.
                    last_name:
                      type: string
                      description: The end user's last name.
            example:
              requirement:
                first_name: Jane
                last_name: Doe
      responses:
        '200':
          description: Action requirement submitted successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      sub_order_id:
                        type: string
                        format: uuid
                      regulatory_requirement_id:
                        type: string
                        format: uuid
                      requirement_action:
                        type: object
                        properties:
                          type:
                            type: string
                          value:
                            type:
                              - string
                              - 'null'
                            description: >-
                              For Australia mobile ID verification, the unique
                              Onfido verification link to share with the end
                              user.
              example:
                data:
                  sub_order_id: 5f8e6b1a-2d3c-4e5f-9a0b-1c2d3e4f5a6b
                  regulatory_requirement_id: a5b8f1d2-3c4e-4f6a-8b9c-0d1e2f3a4b5c
                  requirement_action:
                    type: id_verification
                    value: >-
                      https://verify.onfido.com/v/8f3c2a1b-9d4e-4f6a-8b9c-0d1e2f3a4b5c
        '400':
          $ref: '#/components/responses/BadRequestResponse'
        '401':
          $ref: '#/components/responses/UnauthorizedResponse'
        '404':
          $ref: '#/components/responses/NotFoundResponse'
        '422':
          $ref: '#/components/responses/UnprocessableEntity'
        '500':
          $ref: '#/components/responses/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.externalRequirements.subNumberOrders.update('regulatory_requirement_id',
            'sub_number_order_id', {
              requirement: {},
            });


            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.external_requirements.sub_number_orders.update(
                regulatory_requirement_id="regulatory_requirement_id",
                sub_number_order_id="sub_number_order_id",
                requirement={},
            )
            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\tsubNumberOrder, err := client.ExternalRequirements.SubNumberOrders.Update(\n\t\tcontext.TODO(),\n\t\t\"regulatory_requirement_id\",\n\t\t\"sub_number_order_id\",\n\t\ttelnyx.ExternalRequirementSubNumberOrderUpdateParams{\n\t\t\tRequirement: \"requirement\",\n\t\t},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", subNumberOrder.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.externalRequirements.subNumberOrders.SubNumberOrderUpdateParams;


            public final class Main {
                private Main() {}

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

                    SubNumberOrderUpdateParams params = SubNumberOrderUpdateParams.builder()
                        .requirement(null)
                        .build();
                    var response = client.externalRequirements().subNumberOrders().update("regulatory_requirement_id", "sub_number_order_id", params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            response =
            telnyx.external_requirements.sub_number_orders.update("regulatory_requirement_id",
            "sub_number_order_id", requirement: {})


            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->externalRequirements->subNumberOrders->update(
                'regulatory_requirement_id',
                'sub_number_order_id',
                requirement: [],
              );

              var_dump($response);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx external-requirements:sub-number-orders update \
              --api-key 'My API Key' \
              --regulatory-requirement-id regulatory_requirement_id \
              --sub-number-order-id sub_number_order_id \
              --requirement '{}'
components:
  responses:
    BadRequestResponse:
      description: >-
        Bad request, the request was unacceptable, often due to missing a
        required parameter.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    UnauthorizedResponse:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/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
    NotFoundResponse:
      description: The requested resource doesn't exist.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    UnprocessableEntity:
      description: Unprocessable entity. Check the 'detail' field in response for details.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
    GenericErrorResponse:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Errors'
  schemas:
    Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/Error'
      type: object
    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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````