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

# List all porting events

> Returns a list of all porting events.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/numbers-identity/porting-events.yml get /porting/events
openapi: 3.1.0
info:
  title: Telnyx Porting Events API
  version: 2.0.0
  description: API for porting events and reports.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /porting/events:
    get:
      tags:
        - Porting Orders
      summary: List all porting events
      description: Returns a list of all porting events.
      operationId: listPortingEvents
      parameters:
        - $ref: '#/components/parameters/porting-order_PageConsolidated'
        - name: filter
          in: query
          style: deepObject
          explode: true
          description: >-
            Consolidated filter parameter (deepObject style). Originally:
            filter[type], filter[porting_order_id], filter[created_at][gte],
            filter[created_at][lte]
          schema:
            type: object
            properties:
              type:
                type: string
                enum:
                  - porting_order.deleted
                  - porting_order.loa_updated
                  - porting_order.messaging_changed
                  - porting_order.status_changed
                  - porting_order.sharing_token_expired
                  - porting_order.new_comment
                  - porting_order.split
                example: porting_order.deleted
                description: Filter by event type.
              porting_order_id:
                type: string
                format: uuid
                example: 34dc46a9-53ed-4e01-9454-26227ea13326
                description: Filter by porting order ID.
              created_at:
                type: object
                properties:
                  gte:
                    type: string
                    format: date-time
                    description: Filter by created at greater than or equal to.
                    example: '2021-01-01T00:00:00Z'
                  lte:
                    type: string
                    format: date-time
                    description: Filter by created at less than or equal to.
                    example: '2021-01-01T00:00:00Z'
                description: Created at date range filtering operations
      responses:
        '200':
          $ref: '#/components/responses/ListPortingEventsResponse'
        '422':
          description: >-
            Unprocessable entity. Check the 'detail' 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
            });


            // Automatically fetches more pages as needed.

            for await (const eventListResponse of client.porting.events.list())
            {
              console.log(eventListResponse);
            }
        - 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
            )
            page = client.porting.events.list()
            page = page.data[0]
            print(page)
        - 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\tpage, err := client.Porting.Events.List(context.TODO(), telnyx.PortingEventListParams{})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", page)\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.porting.events.EventListPage;
            import com.telnyx.sdk.models.porting.events.EventListParams;

            public final class Main {
                private Main() {}

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

                    EventListPage page = client.porting().events().list();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            page = telnyx.porting.events.list

            puts(page)
        - 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 {
              $page = $client->porting->events->list(
                filter: [
                  'createdAt' => [
                    'gte' => new \DateTimeImmutable('2021-01-01T00:00:00Z'),
                    'lte' => new \DateTimeImmutable('2021-01-01T00:00:00Z'),
                  ],
                  'portingOrderID' => '34dc46a9-53ed-4e01-9454-26227ea13326',
                  'type' => 'porting_order.deleted',
                ],
                pageNumber: 0,
                pageSize: 0,
              );

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx porting:events list \
              --api-key 'My API Key'
components:
  parameters:
    porting-order_PageConsolidated:
      name: page
      in: query
      style: deepObject
      explode: true
      description: >-
        Consolidated page parameter (deepObject style). Originally: page[size],
        page[number]
      schema:
        type: object
        properties:
          size:
            type: integer
            minimum: 1
            maximum: 250
            default: 20
            description: The size of the page
          number:
            type: integer
            minimum: 1
            default: 1
            description: The page number to load
  responses:
    ListPortingEventsResponse:
      description: Successful response
      content:
        application/json:
          schema:
            type: object
            properties:
              data:
                type: array
                items:
                  $ref: '#/components/schemas/PortingEvent'
              meta:
                $ref: '#/components/schemas/PaginationMeta'
  schemas:
    PortingEvent:
      type: object
      oneOf:
        - $ref: '#/components/schemas/PortingEventDeletedPayload'
        - $ref: '#/components/schemas/PortingEventMessagingChangedPayload'
        - $ref: '#/components/schemas/PortingEventStatusChangedEvent'
        - $ref: '#/components/schemas/PortingEventNewCommentEvent'
        - $ref: '#/components/schemas/PortingEventSplitEvent'
        - $ref: '#/components/schemas/PortingEventWithoutWebhook'
      discriminator:
        propertyName: event_type
        mapping:
          porting_order.deleted:
            $ref: '#/components/schemas/PortingEventDeletedPayload'
          porting_order.messaging_changed:
            $ref: '#/components/schemas/PortingEventMessagingChangedPayload'
          porting_order.status_changed:
            $ref: '#/components/schemas/PortingEventStatusChangedEvent'
          porting_order.new_comment:
            $ref: '#/components/schemas/PortingEventNewCommentEvent'
          porting_order.split:
            $ref: '#/components/schemas/PortingEventSplitEvent'
          porting_order.loa_updated:
            $ref: '#/components/schemas/PortingEventWithoutWebhook'
          porting_order.sharing_token_expired:
            $ref: '#/components/schemas/PortingEventWithoutWebhook'
    PaginationMeta:
      type: object
      properties:
        total_pages:
          type: integer
          example: 3
        total_results:
          type: integer
          example: 55
        page_number:
          type: integer
          example: 2
        page_size:
          type: integer
          example: 25
    PortingEventDeletedPayload:
      type: object
      properties:
        id:
          type: string
          description: Uniquely identifies the event.
          format: uuid
          example: eef3340b-8903-4466-b445-89b697315a3a
        event_type:
          type: string
          description: Identifies the event type
          enum:
            - porting_order.deleted
          example: porting_order.deleted
        porting_order_id:
          type: string
          format: uuid
          description: Identifies the porting order associated with the event.
          example: 9471c873-e3eb-4ca1-957d-f9a451334d52
        available_notification_methods:
          type: array
          items:
            type: string
            enum:
              - email
              - webhook
              - webhook_v1
          description: Indicates the notification methods used.
        payload_status:
          type: string
          description: The status of the payload generation.
          enum:
            - created
            - completed
          example: created
        payload:
          type: object
          properties:
            id:
              type: string
              format: uuid
              example: 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c
              description: Identifies the porting order that was deleted.
            customer_reference:
              type: string
              description: >-
                Identifies the customer reference associated with the porting
                order.
              example: my-ref-001
            deleted_at:
              type: string
              format: date-time
              description: >-
                ISO 8601 formatted date indicating when the porting order was
                deleted.
              example: '2021-03-19T10:07:15.527Z'
            record_type:
              type: string
              example: porting_event
              description: Identifies the type of the resource.
              readOnly: true
            created_at:
              type: string
              format: date-time
              description: >-
                ISO 8601 formatted date indicating when the resource was
                created.
              example: '2021-03-19T10:07:15.527000Z'
            updated_at:
              type: string
              format: date-time
              description: >-
                ISO 8601 formatted date indicating when the resource was
                updated.
              example: '2021-03-19T10:07:15.527000Z'
    PortingEventMessagingChangedPayload:
      type: object
      properties:
        id:
          type: string
          description: Uniquely identifies the event.
          format: uuid
          example: eef3340b-8903-4466-b445-89b697315a3a
        event_type:
          type: string
          description: Identifies the event type
          enum:
            - porting_order.messaging_changed
          example: porting_order.messaging_changed
        porting_order_id:
          type: string
          format: uuid
          description: Identifies the porting order associated with the event.
          example: 9471c873-e3eb-4ca1-957d-f9a451334d52
        available_notification_methods:
          type: array
          items:
            type: string
            enum:
              - email
              - webhook
              - webhook_v1
          description: Indicates the notification methods used.
        payload_status:
          type: string
          description: The status of the payload generation.
          enum:
            - created
            - completed
          example: created
        payload:
          type: object
          description: The webhook payload for the porting_order.messaging_changed event
          properties:
            id:
              type: string
              format: uuid
              example: 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c
              description: Identifies the porting order that was moved.
            customer_reference:
              type: string
              description: >-
                Identifies the customer reference associated with the porting
                order.
              example: my-ref-001
            support_key:
              type: string
              description: Identifies the support key associated with the porting order.
              example: sr_b1a2c3
            messaging:
              type: object
              description: The messaging portability status of the porting order.
              properties:
                messaging_capable:
                  type: boolean
                  description: Indicates whether the porting order is messaging capable.
                  example: true
                enable_messaging:
                  type: boolean
                  description: >-
                    Indicates whether Telnyx will port messaging capabilities
                    from the losing carrier. If false, any messaging
                    capabilities will stay with their current provider.
                  example: true
                messaging_port_status:
                  type: string
                  description: Indicates the messaging port status of the porting order.
                  enum:
                    - not_applicable
                    - pending
                    - activating
                    - exception
                    - canceled
                    - partial_port_complete
                    - ported
                  example: ported
                messaging_port_completed:
                  type: boolean
                  description: Indicates whether the messaging port is completed.
                  example: true
        record_type:
          type: string
          example: porting_event
          description: Identifies the type of the resource.
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2021-03-19T10:07:15.527000Z'
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was updated.
          example: '2021-03-19T10:07:15.527000Z'
    PortingEventStatusChangedEvent:
      type: object
      properties:
        id:
          type: string
          description: Uniquely identifies the event.
          format: uuid
          example: eef3340b-8903-4466-b445-89b697315a3a
        event_type:
          type: string
          description: Identifies the event type
          enum:
            - porting_order.status_changed
          example: porting_order.status_changed
        porting_order_id:
          type: string
          format: uuid
          description: Identifies the porting order associated with the event.
          example: 9471c873-e3eb-4ca1-957d-f9a451334d52
        available_notification_methods:
          type: array
          items:
            type: string
            enum:
              - email
              - webhook
              - webhook_v1
          description: Indicates the notification methods used.
        payload_status:
          type: string
          description: The status of the payload generation.
          enum:
            - created
            - completed
          example: created
        payload:
          type: object
          description: The webhook payload for the porting_order.status_changed event
          properties:
            id:
              type: string
              format: uuid
              example: 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c
              description: Identifies the porting order that was moved.
            customer_reference:
              type: string
              description: >-
                Identifies the customer reference associated with the porting
                order.
              example: my-ref-001
            status:
              $ref: '#/components/schemas/PortingOrderStatus'
            support_key:
              type: string
              description: Identifies the support key associated with the porting order.
              example: sr_b1a2c3
            updated_at:
              type: string
              format: date-time
              description: >-
                ISO 8601 formatted date indicating when the porting order was
                moved.
              example: '2021-03-19T10:07:15.527Z'
            webhook_url:
              type: string
              description: The URL to send the webhook to.
              example: https://example.com/webhook
        record_type:
          type: string
          example: porting_event
          description: Identifies the type of the resource.
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2021-03-19T10:07:15.527000Z'
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was updated.
          example: '2021-03-19T10:07:15.527000Z'
    PortingEventNewCommentEvent:
      type: object
      properties:
        id:
          type: string
          description: Uniquely identifies the event.
          format: uuid
          example: eef3340b-8903-4466-b445-89b697315a3a
        event_type:
          type: string
          description: Identifies the event type
          enum:
            - porting_order.new_comment
          example: porting_order.new_comment
        porting_order_id:
          type: string
          format: uuid
          description: Identifies the porting order associated with the event.
          example: 9471c873-e3eb-4ca1-957d-f9a451334d52
        available_notification_methods:
          type: array
          items:
            type: string
            enum:
              - email
              - webhook
              - webhook_v1
          description: Indicates the notification methods used.
        payload_status:
          type: string
          description: The status of the payload generation.
          enum:
            - created
            - completed
          example: created
        payload:
          type: object
          description: The webhook payload for the porting_order.new_comment event
          properties:
            porting_order_id:
              type: string
              format: uuid
              example: 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c
              description: Identifies the porting order that the comment was added to.
            support_key:
              type: string
              description: Identifies the support key associated with the porting order.
              example: sr_b1a2c3
            comment:
              type: object
              description: The comment that was added to the porting order.
              properties:
                id:
                  type: string
                  format: uuid
                  example: 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c
                  description: Identifies the comment.
                body:
                  type: string
                  description: The body of the comment.
                  example: This is a comment.
                user_id:
                  type: string
                  format: uuid
                  example: 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c
                  description: Identifies the user that create the comment.
                user_type:
                  type: string
                  example: user
                  description: Identifies the type of the user that created the comment.
                  enum:
                    - user
                    - admin
                    - system
                inserted_at:
                  type: string
                  format: date-time
                  description: >-
                    ISO 8601 formatted date indicating when the comment was
                    created.
                  example: '2021-03-19T10:07:15.527Z'
        record_type:
          type: string
          example: porting_event
          description: Identifies the type of the resource.
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2021-03-19T10:07:15.527000Z'
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was updated.
          example: '2021-03-19T10:07:15.527000Z'
    PortingEventSplitEvent:
      type: object
      properties:
        id:
          type: string
          description: Uniquely identifies the event.
          format: uuid
          example: eef3340b-8903-4466-b445-89b697315a3a
        event_type:
          type: string
          description: Identifies the event type
          enum:
            - porting_order.split
          example: porting_order.split
        porting_order_id:
          type: string
          format: uuid
          description: Identifies the porting order associated with the event.
          example: 9471c873-e3eb-4ca1-957d-f9a451334d52
        available_notification_methods:
          type: array
          items:
            type: string
            enum:
              - email
              - webhook
              - webhook_v1
          description: Indicates the notification methods used.
        payload_status:
          type: string
          description: The status of the payload generation.
          enum:
            - created
            - completed
          example: created
        payload:
          type: object
          description: The webhook payload for the porting_order.split event
          properties:
            from:
              type: object
              description: The porting order that was split.
              properties:
                id:
                  type: string
                  format: uuid
                  example: 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c
                  description: Identifies the porting order that was split.
            to:
              type: object
              description: The new porting order that the phone numbers was moved to.
              properties:
                id:
                  type: string
                  format: uuid
                  example: 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c
                  description: Identifies the porting order that was split.
            porting_phone_numbers:
              type: array
              description: >-
                The list of porting phone numbers that were moved to the new
                porting order.
              items:
                type: object
                properties:
                  id:
                    type: string
                    format: uuid
                    example: 96dfa9e4-c753-4fd3-97cd-42d66f26cf0c
                    description: Identifies the porting phone number that was moved.
        record_type:
          type: string
          example: porting_event
          description: Identifies the type of the resource.
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2021-03-19T10:07:15.527000Z'
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was updated.
          example: '2021-03-19T10:07:15.527000Z'
    PortingEventWithoutWebhook:
      type: object
      properties:
        id:
          type: string
          description: Uniquely identifies the event.
          format: uuid
          example: eef3340b-8903-4466-b445-89b697315a3a
        event_type:
          type: string
          description: Identifies the event type
          enum:
            - porting_order.loa_updated
            - porting_order.sharing_token_expired
          example: porting_order.loa_updated
        porting_order_id:
          type: string
          format: uuid
          description: Identifies the porting order associated with the event.
          example: 9471c873-e3eb-4ca1-957d-f9a451334d52
        available_notification_methods:
          type: array
          items:
            type: string
            enum:
              - email
              - webhook
              - webhook_v1
          description: Indicates the notification methods used.
        payload_status:
          type: string
          description: The status of the payload generation.
          enum:
            - created
            - completed
          example: created
        payload:
          type: 'null'
        record_type:
          type: string
          example: porting_event
          description: Identifies the type of the resource.
          readOnly: true
        created_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was created.
          example: '2021-03-19T10:07:15.527000Z'
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 formatted date indicating when the resource was updated.
          example: '2021-03-19T10:07:15.527000Z'
    PortingOrderStatus:
      type: object
      description: Porting order status
      properties:
        details:
          type: array
          items:
            $ref: '#/components/schemas/PortingOrdersExceptionType'
          description: A list of 0 or more details about this porting order's status
        value:
          type: string
          description: The current status of the porting order
          example: ported
          enum:
            - draft
            - in-process
            - submitted
            - exception
            - foc-date-confirmed
            - ported
            - cancelled
            - cancel-pending
    PortingOrdersExceptionType:
      type: object
      properties:
        code:
          type: string
          description: Identifier of an exception type
          enum:
            - ACCOUNT_NUMBER_MISMATCH
            - AUTH_PERSON_MISMATCH
            - BTN_ATN_MISMATCH
            - ENTITY_NAME_MISMATCH
            - FOC_EXPIRED
            - FOC_REJECTED
            - LOCATION_MISMATCH
            - LSR_PENDING
            - MAIN_BTN_PORTING
            - OSP_IRRESPONSIVE
            - OTHER
            - PASSCODE_PIN_INVALID
            - PHONE_NUMBER_HAS_SPECIAL_FEATURE
            - PHONE_NUMBER_MISMATCH
            - PHONE_NUMBER_NOT_PORTABLE
            - PORT_TYPE_INCORRECT
            - PORTING_ORDER_SPLIT_REQUIRED
            - POSTAL_CODE_MISMATCH
            - RATE_CENTER_NOT_PORTABLE
            - SV_CONFLICT
            - SV_UNKNOWN_FAILURE
          example: ENTITY_NAME_MISMATCH
        description:
          type: string
          description: Description of an exception type
          example: Entity name does not match that on the CSR
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````