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

# Initiate an action requirement

> Initiates a specific action requirement for a porting order.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/porting-requirements.yml post /porting_orders/{porting_order_id}/action_requirements/{id}/initiate
openapi: 3.1.0
info:
  title: Telnyx Porting Requirements API
  version: 2.0.0
  description: API for porting requirements, verification, and UK carriers.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /porting_orders/{porting_order_id}/action_requirements/{id}/initiate:
    post:
      tags:
        - Porting Orders
      summary: Initiate an action requirement
      description: Initiates a specific action requirement for a porting order.
      operationId: initiatePortingActionRequirement
      parameters:
        - name: porting_order_id
          in: path
          description: The ID of the porting order
          required: true
          schema:
            type: string
        - name: id
          in: path
          description: The ID of the action requirement
          required: true
          schema:
            type: string
      requestBody:
        $ref: '#/components/requestBodies/InitiatePortingActionRequirement'
      responses:
        '200':
          $ref: '#/components/responses/ShowPortingActionRequirement'
        '400':
          description: Bad request
        '401':
          description: Unauthorized
        '404':
          description: Porting order or action requirement not found
        '422':
          description: Unprocessable entity. Check message field in response for details.
        '500':
          description: Internal server error
      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.portingOrders.actionRequirements.initiate('id', {
              porting_order_id: 'porting_order_id',
              params: { first_name: 'John', last_name: 'Doe' },
            });


            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.porting_orders.action_requirements.initiate(
                id="id",
                porting_order_id="porting_order_id",
                params={
                    "first_name": "John",
                    "last_name": "Doe",
                },
            )
            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.PortingOrders.ActionRequirements.Initiate(\n\t\tcontext.TODO(),\n\t\t\"id\",\n\t\ttelnyx.PortingOrderActionRequirementInitiateParams{\n\t\t\tPortingOrderID: \"porting_order_id\",\n\t\t\tParams: telnyx.PortingOrderActionRequirementInitiateParamsParams{\n\t\t\t\tFirstName: \"John\",\n\t\t\t\tLastName:  \"Doe\",\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\", 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.portingorders.actionrequirements.ActionRequirementInitiateParams;

            import
            com.telnyx.sdk.models.portingorders.actionrequirements.ActionRequirementInitiateResponse;


            public final class Main {
                private Main() {}

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

                    ActionRequirementInitiateParams params = ActionRequirementInitiateParams.builder()
                        .portingOrderId("porting_order_id")
                        .id("id")
                        .params(ActionRequirementInitiateParams.Params.builder()
                            .firstName("John")
                            .lastName("Doe")
                            .build())
                        .build();
                    ActionRequirementInitiateResponse response = client.portingOrders().actionRequirements().initiate(params);
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            response = telnyx.porting_orders.action_requirements.initiate(
              "id",
              porting_order_id: "porting_order_id",
              params: {first_name: "John", last_name: "Doe"}
            )

            puts(response)
        - lang: CLI
          source: |-
            telnyx porting-orders:action-requirements initiate \
              --api-key 'My API Key' \
              --porting-order-id porting_order_id \
              --id id \
              --params '{first_name: John, last_name: Doe}'
components:
  requestBodies:
    InitiatePortingActionRequirement:
      description: Parameters for initiating the action requirement
      required: true
      content:
        application/json:
          schema:
            type: object
            required:
              - params
            properties:
              params:
                oneOf:
                  - $ref: '#/components/schemas/AUIdVerificationParams'
  responses:
    ShowPortingActionRequirement:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                $ref: '#/components/schemas/PortingActionRequirement'
  schemas:
    AUIdVerificationParams:
      type: object
      description: >-
        Required information for initiating the action requirement for AU ID
        verification.
      required:
        - first_name
        - last_name
      properties:
        first_name:
          type: string
          description: >-
            The first name of the person that will perform the verification
            flow.
          example: John
        last_name:
          type: string
          description: The last name of the person that will perform the verification flow.
          example: Doe
    PortingActionRequirement:
      type: object
      properties:
        id:
          type: string
          description: Identifies the action requirement
          example: 6a09cdc3-8948-47f0-aa62-74ac943d6c58
        record_type:
          type: string
          description: Identifies the type of the resource
          example: porting_action_requirement
          enum:
            - porting_action_requirement
        porting_order_id:
          type: string
          description: The ID of the porting order this action requirement belongs to
          example: 12ade33a-21c0-473b-b055-b3c836e1c292
        requirement_type_id:
          type: string
          description: The ID of the requirement type
          example: 53970723-fbff-4f46-a975-f62be6c1a585
        action_type:
          type: string
          description: The type of action required
          example: document_upload
        action_url:
          type:
            - string
            - 'null'
          description: Optional URL for the action
          example: https://example.com/action
        status:
          type: string
          description: Current status of the action requirement
          example: created
          enum:
            - created
            - pending
            - completed
            - cancelled
            - failed
        cancel_reason:
          type:
            - string
            - 'null'
          description: Reason for cancellation if status is 'cancelled'
          example: null
        created_at:
          type: string
          format: date-time
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            created
          example: '2018-02-02T22:25:27.521Z'
        updated_at:
          type: string
          format: date-time
          description: >-
            ISO 8601 formatted date-time indicating when the resource was
            updated
          example: '2018-02-02T22:25:27.521Z'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````