> ## Documentation Index
> Fetch the complete documentation index at: https://plivo.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Import a campaign (beta)

> Import an existing TCR campaign into your Plivo account

This API lets you import a campaign that you have registered directly with The Campaign Registry (TCR). This feature is currently in private beta - please contact our [support team](https://support.plivo.com/hc/en-us/requests/new?ticket_form_id=360000156292) to enable this feature for your account.

#### API Endpoint

```text POST theme={null}
https://api.plivo.com/v1/Account/{auth_id}/10dlc/Campaign/import
```

### Arguments

<table><tbody><tr><td><strong>campaign\_alias <br />string <br />Required</strong></td><td>A friendly name for your campaign.</td></tr><tr><td><strong>campaign\_id <br />string <br />Required</strong></td><td>ID for the campaign that needs to be imported.<p>Make sure you have shared the campaign with Plivo from your TCR portal before submitting the API request.</p></td></tr><tr><td><strong>url <br />string</strong></td><td>The fully qualified URL to which status update callbacks for the message should be sent.</td></tr><tr><td><strong>method <br />string</strong></td><td>The HTTP method to be used when calling the URL defined above.<p>Allowed values: `GET`,` POST`</p><p>Defaults to `POST`</p></td></tr></tbody></table>

### Returns

api\_id for the request, campaign\_id and success message.

<RequestExample>
  ```py Python theme={null}
  ```

  ```ruby Ruby theme={null}
  require "rubygems"
  require "/etc/plivo-ruby/lib/plivo.rb"
  include Plivo

  api = RestClient.new(<auth_id>", "<auth_token>”)

  begin
    puts("import Campaign")
    response = api.campaign.import(campaign_id:"C1234567", campaign_alias:"campaign name")
    puts response
  rescue PlivoRESTError => e
    puts 'Exception: ' + e.message
  end
  ```

  ```js Node theme={null}
  ```

  ```php PHP theme={null}
  ```

  ```java Java theme={null}
  ```

  ```csharp .NET theme={null}
  ```

  ```go Go theme={null}
  package main
  import (
  "fmt"
  "github.com/plivo/plivo-go/v7"
  )
  func main() {
  client, err := plivo.NewClient("<auth_id>", "<auth_token>", &plivo.ClientOptions{})
  if err != nil {
  fmt.Println("err", err.Error)
  }
  response, err := client.Campaign.Import(plivo.ImportCampaignParams{CampaignID: "C1234567", CampaignAlias: "My partner campaign"})
  if err != nil {
  fmt.Println(err.Error)
  return
  }
  fmt.Println("response", response)
  }
  ```

  ```sh cURL theme={null}
  curl -i --user auth_id:auth_token \
      -H "Content-Type: application/json" \
      -d '{
          "campaign_alias": “Friendly Name”,
          "campaign_id": “C1234567”,
          "url": "https://<yourdomain>.com/tendlc_status/",
          "method": "POST"
      }' \
      https://api.plivo.com/v1/Account/{auth_id}/10dlc/Campaign/Import/
  ```
</RequestExample>

### Response

```json theme={null}
{
"api_id": "a640fba2-3b14-11ed-95d8-0242ac110003",
"campaign_id": "<Campaign ID used in the request API>",
"message": "Request to import campaign was received and is being processed."
}
```
