# Campaign Assign Number

## GET or POST Request <a href="#get-or-post-request" id="get-or-post-request"></a>

{% hint style="info" %}
<https://v1.api19.com/campaigns/assign/did>
{% endhint %}

Set the Campaign ID for a specific phone number.

<table data-header-hidden><thead><tr><th width="184.6363525390625"></th><th width="165.09088134765625"></th><th></th></tr></thead><tbody><tr><td>Argument</td><td>Required</td><td>Type</td></tr><tr><td>did</td><td>yes</td><td>your phone number</td></tr><tr><td>campaign_id</td><td>yes</td><td>campaign ID OR canada</td></tr><tr><td>key</td><td>yes</td><td>your API key</td></tr></tbody></table>

Set the campaign on your phone number to a campaign ID or enable for Canada only.&#x20;

{% tabs %}
{% tab title="Curl Post" %}

```php
curl -X POST https://v1.api19.com/campaigns/assign/did \
 -d 'did=3038821111' \
 -d 'campaign_id=CXMR32R' \
 -d 'key=your-key'
```

{% endtab %}

{% tab title="JSON Response" %}

```json
{"status": "ok"}

OR

{"status": "error", "error":"You do not own 3035551212"}

OR

{"status": "error", "error":"You do not own this campaign_id"}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://apidocs.api19.com/campaigns/campaign-assign-number.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
