# Change a toll-free verification's answers

Source: https://jointextkit.com/docs/api/toll-free-verifications/update
Index: https://jointextkit.com/llms.txt

`PATCH /v1/toll-free-verifications/{id}`

Send only the fields to change. Allowed while draft, in_review (until our team sends it to the carriers) and rejected. After a rejection, fix what it asks for here, then submit again.

Send your API key as a bearer token: `Authorization: Bearer ssms_sk_...`. Test keys run this endpoint against the [sandbox](/docs/sandbox); see [Authentication](/docs/authentication) for key modes and scopes.

## Path parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string | Yes | Example: `tfv_a1B2c3D4e5F6`. |

## Request body

JSON (`Content-Type: application/json`).

A `TollFreeVerificationInput` object.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `numbers` | array of string | No | Your live toll-free numbers this program texts from, E.164. One per business unless multiple_numbers_reason says why. |
| `multiple_numbers_reason` | string | No | Why the program needs more than one number (one per store, say). Required with more than one number. |
| `business_name` | string | No | The legal name, as on the IRS EIN letter, optionally with "d/b/a" and the brand your messages carry. Example: `Acme Plumbing LLC d/b/a Acme`. |
| `ein` | string | No | The EIN (US), matching the legal name; elsewhere the business registration number. Example: `12-3456789`. |
| `entity_type` | `PRIVATE_PROFIT`, `PUBLIC_PROFIT`, `NON_PROFIT`, `GOVERNMENT`, `SOLE_PROPRIETOR` | No |  |
| `street` | string | No |  |
| `city` | string | No |  |
| `state` | string | No |  |
| `postal_code` | string | No |  |
| `country` | string | No | Example: `United States`. |
| `contact_first_name` | string | No |  |
| `contact_last_name` | string | No |  |
| `contact_phone` | string | No |  |
| `brand_email` | string | No | The business's own email, for its customers: the HELP reply and the hosted opt-in page name it. |
| `website` | string (uri) | No |  |
| `use_case` | `2fa`, `account_notification`, `customer_care`, `delivery_notification`, `fraud_alert`, `higher_education`, `marketing`, `mixed`, `polling_voting`, `public_service_announcement`, `security_alert`, `low_volume` | No |  |
| `use_case_summary` | string | No | What the program sends, to whom and why. At least 40 characters. At most 1500 characters. |
| `sample_messages` | array of string | No | At least two example messages. At most 8 items. |
| `help_reply` | string | No |  |
| `stop_reply` | string | No |  |
| `opt_in_description` | string | No | How people opt in, step by step. At least 40 characters. At most 2000 characters. |
| `opt_in_url` | string (uri) | No | The opt-in page. With none of your own we make you a hosted one. |
| `monthly_volume` | string | No | Example: `About 1,000 messages per month`. |
| `volume_basis` | `existing`, `projecting` | No |  |
| `advertising` | `yes`, `no`, `unsure` | No | Whether the messages advertise a product or service. |
| `previous_service` | `new`, `short_code`, `long_number` | No | Where this traffic ran before. |
| `previous_content` | string | No | Sample messages from the previous service (not new only). At most 2000 characters. |
| `previous_numbers` | string | No | The numbers it used (not new only). |
| `number_published` | string | No | Where people see this number. |
| `fortune_500` | boolean | No |  |
| `urls_in_messages` | string | No | Links your messages include, or "None". |
| `phones_in_messages` | string | No | Phone numbers your messages include, or "None". |
| `terms_url` | string (uri) | No |  |
| `privacy_url` | string (uri) | No |  |

## Responses

| Status | Meaning | Body |
| --- | --- | --- |
| 200 | Toll-free verification | `TollFreeVerification` |
| 400 | invalid_request: a field of the wrong type or value (param names it) | `Error` |
| 401 | Missing, malformed, or revoked API key | `Error` |
| 402 | Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or charged | `Error` |
| 404 | Not found | `Error` |
| 409 | invalid_state: with the carriers or verified, so it can't change; or a number is on another verification | `Error` |
| 429 | Rate limit or quota exceeded | `Error` |

### 200: `TollFreeVerification` fields

| Field | Type | Description |
| --- | --- | --- |
| `id` | string | Example: `tfv_a1B2c3D4e5F6`. |
| `object` | `toll_free_verification` |  |
| `status` | `draft`, `in_review`, `submitted`, `verified`, `rejected` | draft: not submitted. in_review: our team is checking it by hand; nothing has gone to the carriers yet. submitted: we sent it to the carriers; waiting on their answer. verified: its numbers text anyone who opted in. rejected: sent back; rejection.reason says why. |
| `numbers` | array of string |  |
| `business_name` | string |  |
| `ready` | boolean | Nothing the carriers require is missing (problems is empty). |
| `problems` | array of object | What the carriers would send it back for, one entry per answer to fix. |
| `problems[].field` | string | Example: `ein`. |
| `problems[].message` | string |  |
| `editable` | boolean | Whether PATCH may change it now (draft, in_review and rejected). |
| `next_actor` | `you`, `textkit`, `carriers`, `nobody` | Who acts next. |
| `form` | TollFreeVerificationInput | The form as it stands, every field. contact_email is always our support address: the carriers write to us, and we forward what only you can answer. |
| `business` | object | The business on the form, as business verification sees it. Nullable. |
| `business.status` | `not_started`, `pending`, `verified`, `rejected` |  |
| `business.attestation_needed` | boolean | Submit needs an attestation for these business details. |
| `business.signed` | object | Nullable. |
| `business.signed.signer_name` | string |  |
| `business.signed.signer_title` | string |  |
| `business.signed.signed_at` | string (date-time) |  |
| `business.rejection` | object | Nullable. |
| `business.rejection.code` | string |  |
| `business.rejection.note` | string | Nullable. |
| `rejection` | object | Set while rejected: what the carriers or our team asked for. Nullable. |
| `rejection.reason` | string |  |
| `rejection.rejected_at` | string (date-time) |  |
| `carrier_reference` | string | The carriers' case number, once they give one. Nullable. |
| `registration_id` | string | The registration it was filled in from, if any. Nullable. |
| `history` | array of object |  |
| `history[].at` | string (date-time) |  |
| `history[].status` | `draft`, `in_review`, `submitted`, `verified`, `rejected` |  |
| `history[].actor` | `customer`, `staff`, `system`, `carrier` |  |
| `history[].note` | string | Nullable. |
| `created_at` | string (date-time) |  |
| `updated_at` | string (date-time) |  |

## Errors

| Status | When |
| --- | --- |
| 400 | invalid_request: a field of the wrong type or value (param names it) |
| 401 | Missing, malformed, or revoked API key |
| 402 | Billable live calls only: the prepaid credit balance cannot cover the call (insufficient_credits); nothing was done or charged |
| 404 | Not found |
| 409 | invalid_state: with the carriers or verified, so it can't change; or a number is on another verification |
| 429 | Rate limit or quota exceeded |

Every error has the same JSON shape, and `request_id` matches the `X-Request-Id` response header. [Errors](/docs/errors) lists every code and what to do about it.

```json
{
  "error": {
    "code": "invalid_request",
    "message": "What went wrong, in plain words.",
    "param": "the_field",
    "request_id": "req_a1B2c3D4e5F6g7H8"
  }
}
```

## Examples

### Node.js

The Node.js SDK does not wrap this endpoint yet; call it over HTTP.

```javascript
const res = await fetch('https://api.jointextkit.com/v1/toll-free-verifications/tfv_a1B2c3D4e5F6', {
  method: 'PATCH',
  headers: {
    Authorization: `Bearer ${process.env.TEXTKIT_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "numbers": [
      "+18335550100"
    ],
    "business_name": "Acme Plumbing LLC d/b/a Acme",
    "ein": "12-3456789",
    "country": "United States",
    "monthly_volume": "About 1,000 messages per month"
  }),
});

if (!res.ok) throw new Error((await res.json()).error.message);
const data = await res.json();
```

### PHP

```php
<?php

$ch = curl_init('https://api.jointextkit.com/v1/toll-free-verifications/tfv_a1B2c3D4e5F6');
curl_setopt_array($ch, [
    CURLOPT_CUSTOMREQUEST => 'PATCH',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('TEXTKIT_API_KEY'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'numbers' => [
            '+18335550100',
        ],
        'business_name' => 'Acme Plumbing LLC d/b/a Acme',
        'ein' => '12-3456789',
        'country' => 'United States',
        'monthly_volume' => 'About 1,000 messages per month',
    ]),
]);

$data = json_decode(curl_exec($ch), true);
```

### Python

The Python SDK does not wrap this endpoint yet; call it over HTTP.

```python
import json, os, urllib.request

req = urllib.request.Request(
    "https://api.jointextkit.com/v1/toll-free-verifications/tfv_a1B2c3D4e5F6",
    method="PATCH",
    headers={
        "Authorization": f"Bearer {os.environ['TEXTKIT_API_KEY']}",
        "Content-Type": "application/json",
    },
    data=json.dumps({
        "numbers": [
            "+18335550100"
        ],
        "business_name": "Acme Plumbing LLC d/b/a Acme",
        "ein": "12-3456789",
        "country": "United States",
        "monthly_volume": "About 1,000 messages per month"
    }).encode(),
)
with urllib.request.urlopen(req) as res:
    data = json.load(res)
```

### Ruby

```ruby
require "net/http"
require "json"

uri = URI("https://api.jointextkit.com/v1/toll-free-verifications/tfv_a1B2c3D4e5F6")
req = Net::HTTP::Patch.new(uri)
req["Authorization"] = "Bearer #{ENV["TEXTKIT_API_KEY"]}"
req["Content-Type"] = "application/json"
req.body = {
  "numbers": [
    "+18335550100"
  ],
  "business_name": "Acme Plumbing LLC d/b/a Acme",
  "ein": "12-3456789",
  "country": "United States",
  "monthly_volume": "About 1,000 messages per month"
}.to_json

res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)
```

### Go

```go
package main

import (
	"fmt"
	"io"
	"net/http"
	"os"
	"strings"
)

func main() {
	body := strings.NewReader(`{
	  "numbers": [
	    "+18335550100"
	  ],
	  "business_name": "Acme Plumbing LLC d/b/a Acme",
	  "ein": "12-3456789",
	  "country": "United States",
	  "monthly_volume": "About 1,000 messages per month"
	}`)
	req, _ := http.NewRequest("PATCH", "https://api.jointextkit.com/v1/toll-free-verifications/tfv_a1B2c3D4e5F6", body)
	req.Header.Set("Authorization", "Bearer "+os.Getenv("TEXTKIT_API_KEY"))
	req.Header.Set("Content-Type", "application/json")

	res, err := http.DefaultClient.Do(req)
	if err != nil {
		panic(err)
	}
	defer res.Body.Close()
	data, _ := io.ReadAll(res.Body)
	fmt.Println(res.Status, string(data))
}
```

### Rust

```rust
// cargo add reqwest --features blocking,json
// cargo add serde_json
use serde_json::json;

fn main() -> Result<(), Box<dyn std::error::Error>> {
    let key = std::env::var("TEXTKIT_API_KEY")?;
    let res = reqwest::blocking::Client::new()
        .patch("https://api.jointextkit.com/v1/toll-free-verifications/tfv_a1B2c3D4e5F6")
        .bearer_auth(key)
        .json(&json!({
          "numbers": [
            "+18335550100"
          ],
          "business_name": "Acme Plumbing LLC d/b/a Acme",
          "ein": "12-3456789",
          "country": "United States",
          "monthly_volume": "About 1,000 messages per month"
        }))
        .send()?
        .error_for_status()?;
    let data: serde_json::Value = res.json()?;
    println!("{data}");
    Ok(())
}
```

### Java

```java
import java.net.URI;
import java.net.http.*;

public class Main {
    public static void main(String[] args) throws Exception {
        var request = HttpRequest.newBuilder(URI.create("https://api.jointextkit.com/v1/toll-free-verifications/tfv_a1B2c3D4e5F6"))
            .header("Authorization", "Bearer " + System.getenv("TEXTKIT_API_KEY"))
            .header("Content-Type", "application/json")
            .method("PATCH", HttpRequest.BodyPublishers.ofString("""
                {
                  "numbers": [
                    "+18335550100"
                  ],
                  "business_name": "Acme Plumbing LLC d/b/a Acme",
                  "ein": "12-3456789",
                  "country": "United States",
                  "monthly_volume": "About 1,000 messages per month"
                }
                """))
            .build();

        var response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
        System.out.println(response.statusCode() + " " + response.body());
    }
}
```

### .NET

```csharp
using System.Net.Http.Headers;
using System.Text;

var http = new HttpClient();
http.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
    "Bearer", Environment.GetEnvironmentVariable("TEXTKIT_API_KEY"));

var body = new StringContent("""
    {
      "numbers": [
        "+18335550100"
      ],
      "business_name": "Acme Plumbing LLC d/b/a Acme",
      "ein": "12-3456789",
      "country": "United States",
      "monthly_volume": "About 1,000 messages per month"
    }
    """, Encoding.UTF8, "application/json");
var res = await http.PatchAsync("https://api.jointextkit.com/v1/toll-free-verifications/tfv_a1B2c3D4e5F6", body);
res.EnsureSuccessStatusCode();

var data = await res.Content.ReadAsStringAsync();
```

### cURL

```bash
curl -X PATCH "https://api.jointextkit.com/v1/toll-free-verifications/tfv_a1B2c3D4e5F6" \
  -H "Authorization: Bearer $TEXTKIT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "numbers": [
    "+18335550100"
  ],
  "business_name": "Acme Plumbing LLC d/b/a Acme",
  "ein": "12-3456789",
  "country": "United States",
  "monthly_volume": "About 1,000 messages per month"
}'
```

## Related

- Guide: [Numbers](/docs/numbers)
- [All toll-free verifications endpoints](/docs/api#toll-free-verifications)
- [API reference](/docs/api)
