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

# SIP Registration Status

> Returns the live SIP registration state of a UAC connection: whether it is currently registered, when it last registered, and the last response Telnyx received from the registrar. Only `uac_external_credential` is supported today.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/real-time-communications/uac-connections.yml get /sip_registration_status
openapi: 3.1.0
info:
  title: Telnyx UAC Connections API
  version: 2.0.0
  description: API for UAC (User Agent Client) connections.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /sip_registration_status:
    get:
      tags:
        - UAC Connections
      summary: SIP Registration Status
      description: >-
        Returns the live SIP registration state of a UAC connection: whether it
        is currently registered, when it last registered, and the last response
        Telnyx received from the registrar. Only `uac_external_credential` is
        supported today.
      operationId: GetSipRegistrationStatus
      parameters:
        - name: credential_type
          in: query
          required: true
          description: >-
            The kind of credential to look up. `uac_external_credential` is
            keyed by `connection_id`; `telephony_credential` is keyed by
            `username`.
          schema:
            type: string
            enum:
              - uac_external_credential
              - telephony_credential
        - name: connection_id
          in: query
          required: false
          description: >-
            Identifier of the UAC connection to look up. Required when
            `credential_type` is `uac_external_credential`.
          schema:
            type: string
          example: '1234567890'
        - name: username
          in: query
          required: false
          description: >-
            SIP username of the telephony credential to look up. Required when
            `credential_type` is `telephony_credential`.
          schema:
            type: string
      responses:
        '200':
          description: Registration status payload
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SipRegistrationStatus'
              example:
                connection_id: '1234567890'
                connection_name: FreePBX UAC 1002
                credential_type: uac_external_credential
                credential_username: useralice12345
                registered: true
                sip_registration_status: registered
                last_registration_response: 200 OK
                sip_registration_details:
                  auth_retries: 0
                  expires: 1780404431
                  uptime: 1780401551699908
                  next_action_at: 1780414482
                  failures: 0
                  sip_uri_user_host: 1002@192.0.2.10
        '400':
          description: Missing or invalid query parameters
        '401':
          description: Missing or invalid API key
        '403':
          description: Connection exists but is not owned by the authenticated account
        '404':
          description: No connection matches connection_id
      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 sipRegistrationStatus = await
            client.sipRegistrationStatus.retrieve({
              credential_type: 'uac_external_credential',
            });


            console.log(sipRegistrationStatus.connection_id);
        - 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
            )
            sip_registration_status = client.sip_registration_status.retrieve(
                credential_type="uac_external_credential",
            )
            print(sip_registration_status.connection_id)
        - 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\tsipRegistrationStatus, err := client.SipRegistrationStatus.Get(context.TODO(), telnyx.SipRegistrationStatusGetParams{\n\t\tCredentialType: telnyx.SipRegistrationStatusGetParamsCredentialTypeUacExternalCredential,\n\t})\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", sipRegistrationStatus.ConnectionID)\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.sipregistrationstatus.SipRegistrationStatusRetrieveParams;

            import
            com.telnyx.sdk.models.sipregistrationstatus.SipRegistrationStatusRetrieveResponse;


            public final class Main {
                private Main() {}

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

                    SipRegistrationStatusRetrieveParams params = SipRegistrationStatusRetrieveParams.builder()
                        .credentialType(SipRegistrationStatusRetrieveParams.CredentialType.UAC_EXTERNAL_CREDENTIAL)
                        .build();
                    SipRegistrationStatusRetrieveResponse sipRegistrationStatus = client.sipRegistrationStatus().retrieve(params);
                }
            }
        - lang: Ruby
          source: >-
            require "telnyx"


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


            sip_registration_status =
            telnyx.sip_registration_status.retrieve(credential_type:
            :uac_external_credential)


            puts(sip_registration_status)
        - 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 {
              $sipRegistrationStatus = $client->sipRegistrationStatus->retrieve(
                credentialType: 'uac_external_credential',
                connectionID: 'connection_id',
                username: 'username',
              );

              var_dump($sipRegistrationStatus);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx sip-registration-status retrieve \
              --api-key 'My API Key' \
              --credential-type uac_external_credential
components:
  schemas:
    SipRegistrationStatus:
      type: object
      properties:
        connection_id:
          type: string
          description: Identifier of the connection associated with the credential.
        connection_name:
          type: string
          description: Human-readable connection name.
        credential_type:
          type: string
          description: The credential type that was looked up.
          enum:
            - uac_external_credential
            - telephony_credential
        credential_username:
          type: string
          description: SIP username used for the registration.
        registered:
          type: boolean
          description: True if the endpoint is currently registered.
        sip_registration_status:
          type: string
          description: Human-readable registration status derived from the registrar state.
          enum:
            - unregistering
            - connection_disabled
            - standby
            - failed
            - trying
            - registered
            - unknown
        last_registration_response:
          type: string
          description: SIP response from the last registration attempt.
          example: 200 OK
        sip_registration_details:
          type: object
          description: >-
            Detailed registration information reported by the registrar. The
            populated fields depend on `credential_type`.
          properties:
            auth_retries:
              type: integer
              description: Number of authentication retries on the last attempt.
            expires:
              type: integer
              description: Unix timestamp when the current registration expires.
            uptime:
              type: integer
              description: Registration uptime reported by the registrar.
            next_action_at:
              type: integer
              description: Unix timestamp of the next scheduled registration action.
            failures:
              type: integer
              description: Count of consecutive registration failures.
            sip_uri_user_host:
              type: string
              description: SIP URI user@host of the registered contact.
            ua_ip:
              type: string
              description: IP address of the registered user agent (telephony_credential).
            ua_port:
              type: integer
              description: Port of the registered user agent (telephony_credential).
            transport:
              type: string
              description: >-
                Transport used for the registration, e.g. UDP/TCP/TLS
                (telephony_credential).
            node:
              type: string
              description: Registrar node handling the registration (telephony_credential).
            last_modified:
              type: string
              description: >-
                Timestamp when the registration row was last modified
                (telephony_credential).
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````