VYG Docs

List building

POST/v1/list-building/campaigns/{campaign_id}/subscribers

Scope: contacts:write.

Add a phone number to a live list campaign. The person receives a confirmation text and must reply Y before they are subscribed. Include the consent text they saw.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

campaign_id*string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/list-building/campaigns/string/subscribers" \  -H "Content-Type: application/json" \  -d '{    "phone": "string"  }'
{  "status": "pending",  "campaign_id": "string",  "contact_id": "string",  "message": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/list-building/webhooks/{list_id}

Send a phone number from an external pop-up tool. The List ID in the URL is the credential; no API key is required. The person receives a confirmation text and must reply Y before they are subscribed.

Path Parameters

list_id*string

Query Parameters

tool?string

Request Body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/list-building/webhooks/string" \  -H "Content-Type: application/json" \  -d '{}'
{  "status": "accepted"}
{  "error": "string",  "message": "string"}
{  "error": "string",  "message": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/list-building/imports

Requires sign-in (OAuth). Scope: signup_forms:read.

The brand’s subscriber imports, newest first.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Query Parameters

limit?integer

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/list-building/imports"
{  "data": [    {      "id": "string",      "name": "string",      "status": "string",      "channel": "string",      "created_at": "string",      "completed_at": "string",      "counts": {        "total": 0,        "added": 0,        "upgraded": 0,        "already_subscribed": 0,        "unsubscribed": 0,        "already_unsubscribed": 0,        "skipped_opted_out": 0,        "conflict": 0,        "invalid_phone": 0,        "invalid_status": 0,        "duplicate_in_file": 0      },      "issues": [        {          "row": 0,          "phone": "string",          "reason": "invalid_phone"        }      ],      "error": "string"    }  ],  "next_cursor": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
POST/v1/list-building/imports

Scope: contacts:write.

Import a list of phone numbers, for example sign-ups collected at an event, with a title. Each row has an optional status: subscribed (the default) or unsubscribed. Subscribed people are added right away and no confirmation text is sent; numbers that opted out or are blocked are never resubscribed. Unsubscribed rows are added as unsubscribed, or switch an existing subscriber off. A number already on file is updated in place, and a number that belongs to another brand is skipped. Set consent_attested to true to import subscribed rows. Use dry_run to preview the counts first.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/list-building/imports" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "import_id": "string",  "name": "string",  "status": "previewed",  "counts": {    "total": 0,    "added": 0,    "upgraded": 0,    "already_subscribed": 0,    "unsubscribed": 0,    "already_unsubscribed": 0,    "skipped_opted_out": 0,    "conflict": 0,    "invalid_phone": 0,    "invalid_status": 0,    "duplicate_in_file": 0  },  "issues": [    {      "row": 0,      "phone": "string",      "reason": "invalid_phone"    }  ],  "customer_data_sync": "published",  "message": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
GET/v1/list-building/imports/{id}

Requires sign-in (OAuth). Scope: signup_forms:read.

One subscriber import with its counts and the rows that were skipped. Returns 404 if not found.

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

id*string

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X GET "https://example.com/v1/list-building/imports/string"
{  "id": "string",  "name": "string",  "status": "string",  "channel": "string",  "created_at": "string",  "completed_at": "string",  "counts": {    "total": 0,    "added": 0,    "upgraded": 0,    "already_subscribed": 0,    "unsubscribed": 0,    "already_unsubscribed": 0,    "skipped_opted_out": 0,    "conflict": 0,    "invalid_phone": 0,    "invalid_status": 0,    "duplicate_in_file": 0  },  "issues": [    {      "row": 0,      "phone": "string",      "reason": "invalid_phone"    }  ],  "error": "string"}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}
{  "error": {    "code": "bad_request",    "message": "string"  }}