> ## 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 shared partner campaigns

> Get all partner campaigns you have shared to Telnyx in a paginated fashion

This endpoint is currently limited to only returning shared campaigns that Telnyx
has accepted. In other words, shared but pending campaigns are currently omitted
from the response from this endpoint.



## OpenAPI

````yaml https://telnyx-openapi-ng.s3.us-east-1.amazonaws.com/messaging-10dlc/partner-campaigns.yml get /10dlc/partnerCampaign/sharedByMe
openapi: 3.1.0
info:
  title: Telnyx 10DLC Partner Campaigns API
  version: 2.0.0
  description: API for 10DLC partner campaign management and sharing.
  contact:
    email: support@telnyx.com
servers:
  - url: https://api.telnyx.com/v2
security:
  - bearerAuth: []
paths:
  /10dlc/partnerCampaign/sharedByMe:
    get:
      tags:
        - Shared Campaigns
      summary: List shared partner campaigns
      description: >-
        Get all partner campaigns you have shared to Telnyx in a paginated
        fashion


        This endpoint is currently limited to only returning shared campaigns
        that Telnyx

        has accepted. In other words, shared but pending campaigns are currently
        omitted

        from the response from this endpoint.
      operationId: GetPartnerCampaignsSharedByUser
      parameters:
        - description: The 1-indexed page number to get. The default value is `1`.
          required: false
          schema:
            title: Page
            type: integer
            description: The 1-indexed page number to get. The default value is `1`.
            default: 1
          name: page
          in: query
        - description: >-
            The amount of records per page, limited to between 1 and 500
            inclusive. The default value is `10`.
          required: false
          schema:
            title: Recordsperpage
            type: integer
            description: >-
              The amount of records per page, limited to between 1 and 500
              inclusive. The default value is `10`.
            default: 10
          name: recordsPerPage
          in: query
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SharedCampaignRecordSet'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
        4XX:
          $ref: '#/components/responses/10dlc_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
            });


            // Automatically fetches more pages as needed.

            for await (const partnerCampaignListSharedByMeResponse of
            client.messaging10dlc.partnerCampaigns.listSharedByMe()) {
              console.log(partnerCampaignListSharedByMeResponse.brandId);
            }
        - 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.messaging_10dlc.partner_campaigns.list_shared_by_me()
            page = page.records[0]
            print(page.brand_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\tpage, err := client.Messaging10dlc.PartnerCampaigns.ListSharedByMe(context.TODO(), telnyx.Messaging10dlcPartnerCampaignListSharedByMeParams{})\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.messaging10dlc.partnercampaigns.PartnerCampaignListSharedByMePage;

            import
            com.telnyx.sdk.models.messaging10dlc.partnercampaigns.PartnerCampaignListSharedByMeParams;


            public final class Main {
                private Main() {}

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

                    PartnerCampaignListSharedByMePage page = client.messaging10dlc().partnerCampaigns().listSharedByMe();
                }
            }
        - lang: Ruby
          source: |-
            require "telnyx"

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

            page = telnyx.messaging_10dlc.partner_campaigns.list_shared_by_me

            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->messaging10dlc->partnerCampaigns->listSharedByMe(
                page: 0, recordsPerPage: 0
              );

              var_dump($page);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: CLI
          source: |-
            telnyx messaging-10dlc:partner-campaigns list-shared-by-me \
              --api-key 'My API Key'
components:
  schemas:
    SharedCampaignRecordSet:
      title: SharedCampaignRecordSet
      type: object
      properties:
        page:
          title: Page
          type: integer
        records:
          title: Records
          type: array
          items:
            $ref: '#/components/schemas/SharedCampaign'
        totalRecords:
          title: Totalrecords
          type: integer
    HTTPValidationError:
      title: HTTPValidationError
      type: object
      properties:
        detail:
          title: Detail
          type: array
          items:
            $ref: '#/components/schemas/ValidationError'
    SharedCampaign:
      title: SharedCampaign
      required:
        - brandId
        - campaignId
        - usecase
      type: object
      properties:
        brandId:
          title: Brandid
          type: string
          description: Alphanumeric identifier of the brand associated with this campaign.
        campaignId:
          title: Campaignid
          type: string
          description: >-
            Alphanumeric identifier assigned by the registry for a campaign.
            This identifier is required by the NetNumber OSR SMS enabling
            process of 10DLC.
        createDate:
          title: Createdate
          type: string
          description: Unix timestamp when campaign was created.
        status:
          title: Status
          type: string
          description: >-
            Current campaign status. Possible values: ACTIVE, EXPIRED. A newly
            created campaign defaults to ACTIVE status. 
        usecase:
          title: Usecase
          type: string
          description: >-
            Campaign usecase. Must be of defined valid types. Use
            `/10dlc/enum/usecase` operation to retrieve usecases available for
            given brand.
      description: >-
        Campaign is generated by the 10DLC registry once the corresponding
        campaign request is approved. Each campaign is assigned a unique
        identifier - **campaignId**. Once a campaign is activated, limited
        information is published to the NetNumber OSR service for consumption by
        members of the ecosystem. When a campaign is suspended(reversible) or
        expired(non-reversible), campaign data is deleted from the OSR service.
        Most attributes of campaignare immutable, including **usecase**,
        **vertical**, **brandId** and **cspId**.
    ValidationError:
      title: ValidationError
      required:
        - loc
        - msg
        - type
      type: object
      properties:
        loc:
          title: Location
          type: array
          items:
            anyOf:
              - type: string
              - type: integer
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
    10dlc_Errors:
      properties:
        errors:
          type: array
          items:
            $ref: '#/components/schemas/10dlc_Error'
      type: object
    10dlc_Error:
      required:
        - code
        - title
      type: object
      properties:
        code:
          type: string
        title:
          type: string
        detail:
          type: string
        source:
          type: object
          properties:
            pointer:
              description: JSON pointer (RFC6901) to the offending entity.
              type: string
            parameter:
              description: Indicates which query parameter caused the error.
              type: string
  responses:
    10dlc_GenericErrorResponse:
      description: Generic response error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/10dlc_Errors'
  securitySchemes:
    bearerAuth:
      scheme: bearer
      type: http

````