# Create_State

Create a state.

`POST /v2/states`

**API:** Avalara CertCapture RESTful APIs
**Tag:** States
**API Version:** v2
**Base URL:** https://sbx-api.certcapture.com/v2/
**Content-Type:** `application/json`
**Accepts:** `application/json`
**Authentication:** Basic (username + license key) or API Key (`Authorization` in header)

Source: https://developer.avalara.com/products/ecm/api/certcapture/methods/States/Create_State/

## Description

Create a state for a specific company.

## Parameters

| Name | Type | In | Required | Description |
|---|---|---|---|---|
| `x-client-id` | integer | header | Yes | To access a client ID, it is available from Company Settings -> Company Details -> Company ID |

## Request Body

**Schema:** `State`

States Model

| Property | Type | Required | Description |
|---|---|---|---|
| `country` | integer | No | The country the state belongs to. Example: `1`. |
| `initials` | string | No | The states initials. Example: `NC`. |
| `name` | string | No | The name of the state. Example: `North Carolina`. |

## Responses

| Status | Description | Schema |
|---|---|---|
| 200 | Success | `StateResponse` |
| 400 | Bad Request |  |
| 401 | Unauthorized |  |

### 200 Response: `StateResponse`

States Response Model

| Property | Type | Required | Description |
|---|---|---|---|
| `id` | integer | No | System Generated State id Example: `42`. |
| `initials` | string | No | The states initials. Example: `NC`. |
| `name` | string | No | The name of the state. Example: `North Carolina`. |

## Example Request

```bash
curl -X POST "https://sbx-api.certcapture.com/v2/v2/states" \
  -H "Authorization: Basic <credentials>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
  "country": "1",
  "initials": "NC",
  "name": "North Carolina"
}'
```