# Accounts and provisioning (Account REST API (/users/current))

> Tickwire API reference, generated from the OpenAPI document the services export. Base URL: https://api.tickwire.io. Replace YOUR_API_KEY and YOUR_ACCOUNT_ID with your own values; use a sandbox key (twsk_…) to experiment.

Source: https://tickwire.io/docs/reference/provisioning/

### GET /users/current/accounts

**List Accounts**

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `offset` | query | `integer` | no |  |
| `limit` | query | `integer` | no |  |
| `version` | query | `integer[] \| null` | no |  |
| `type` | query | `string \| null` | no |  |
| `state` | query | `string[] \| null` | no |  |
| `connectionStatus` | query | `string[] \| null` | no |  |
| `deploymentStatus` | query | `"deployed" \| "undeployed" \| "failed" \| null` | no |  |
| `query` | query | `string \| null` | no |  |
| `provisioningProfileId` | query | `string \| null` | no |  |
| `region` | query | `string[] \| null` | no |  |
| `tags` | query | `string[] \| null` | no |  |
| `sortOrder` | query | `"asc" \| "desc" \| null` | no |  |
| `api-version` | header | `string \| null` | no |  |

Responses:

- `200` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)

curl:

```bash
curl -sS -X GET 'https://api.tickwire.io/users/current/accounts' \
  -H 'auth-token: YOUR_API_KEY'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "GET",
        "/users/current/accounts",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("GET", "/users/current/accounts");
console.log(result);
tw.close();
```

### POST /users/current/accounts

**Create Account** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `transaction-id` | header | `string \| null` | no |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Request body: `NewTradingAccount` (required)

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | yes |  |
| `server` | `string` | yes |  |
| `login` | `string \| integer \| null` | no |  |
| `password` | `string \| null` | no |  |
| `platform` | `"mt4" \| "mt5" \| null` | no |  |
| `provisioningProfileId` | `string \| null` | no |  |
| `magic` | `integer` | no |  |
| `manualTrades` | `boolean` | no |  |
| `slippage` | `number \| null` | no |  |
| `quoteStreamingIntervalInSeconds` | `number` | no |  |
| `tags` | `string[]` | no |  |
| `metadata` | `object \| null` | no |  |
| `reliability` | `"regular" \| "high"` | no |  |
| `resourceSlots` | `integer` | no |  |
| `copyFactoryResourceSlots` | `integer` | no |  |
| `region` | `string \| null` | no |  |
| `type` | `"cloud" \| "cloud-g1" \| "cloud-g2"` | no |  |
| `symbol` | `string \| null` | no |  |
| `baseCurrency` | `string \| null` | no |  |
| `copyFactoryRoles` | `"PROVIDER" \| "SUBSCRIBER"[]` | no |  |
| `riskManagementApiEnabled` | `boolean` | no |  |
| `metastatsApiEnabled` | `boolean` | no |  |
| `allocateDedicatedIp` | `"ipv4" \| "none" \| null` | no |  |
| `keywords` | `string[]` | no |  |
| `serverAddress` | `string \| null` | no |  |

Responses:

- `201` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this' \
  -H 'Content-Type: application/json' \
  -d '{"name":"example","server":"Tickwire-Sandbox","magic":0,"manualTrades":false,"quoteStreamingIntervalInSeconds":2.5,"reliability":"regular","resourceSlots":1,"copyFactoryResourceSlots":1,"type":"cloud-g2","riskManagementApiEnabled":false,"metastatsApiEnabled":false}'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "POST",
        "/users/current/accounts",
        json={
            "name": "example",
            "server": "Tickwire-Sandbox",
            "magic": 0,
            "manualTrades": False,
            "quoteStreamingIntervalInSeconds": 2.5,
            "reliability": "regular",
            "resourceSlots": 1,
            "copyFactoryResourceSlots": 1,
            "type": "cloud-g2",
            "riskManagementApiEnabled": False,
            "metastatsApiEnabled": False,
        },
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts", {
  body: {
    "name": "example",
    "server": "Tickwire-Sandbox",
    "magic": 0,
    "manualTrades": false,
    "quoteStreamingIntervalInSeconds": 2.5,
    "reliability": "regular",
    "resourceSlots": 1,
    "copyFactoryResourceSlots": 1,
    "type": "cloud-g2",
    "riskManagementApiEnabled": false,
    "metastatsApiEnabled": false
  },
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### GET /users/current/accounts/{account_id}

**Get Account**

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `account_id` | path | `string` | yes |  |

Responses:

- `200` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `404` [`account_not_found`](https://tickwire.io/docs/errors/account_not_found/)

curl:

```bash
curl -sS -X GET 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID' \
  -H 'auth-token: YOUR_API_KEY'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "GET",
        "/users/current/accounts/YOUR_ACCOUNT_ID",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("GET", "/users/current/accounts/YOUR_ACCOUNT_ID");
console.log(result);
tw.close();
```

### PUT /users/current/accounts/{account_id}

**Update Account** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `account_id` | path | `string` | yes |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Request body: `UpdateTradingAccount` (required)

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | `string \| null` | no |  |
| `password` | `string \| null` | no |  |
| `server` | `string \| null` | no |  |
| `magic` | `integer \| null` | no |  |
| `manualTrades` | `boolean \| null` | no |  |
| `slippage` | `number \| null` | no |  |
| `quoteStreamingIntervalInSeconds` | `number \| null` | no |  |
| `tags` | `string[] \| null` | no |  |
| `metadata` | `object \| null` | no |  |
| `copyFactoryRoles` | `"PROVIDER" \| "SUBSCRIBER"[] \| null` | no |  |
| `resourceSlots` | `integer \| null` | no |  |
| `copyFactoryResourceSlots` | `integer \| null` | no |  |
| `metastatsApiEnabled` | `boolean \| null` | no |  |
| `allocateDedicatedIp` | `"ipv4" \| "none" \| null` | no |  |
| `serverAddress` | `string \| null` | no |  |

Responses:

- `204` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `404` [`account_not_found`](https://tickwire.io/docs/errors/account_not_found/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X PUT 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "PUT",
        "/users/current/accounts/YOUR_ACCOUNT_ID",
        json={},
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("PUT", "/users/current/accounts/YOUR_ACCOUNT_ID", {
  body: {},
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### DELETE /users/current/accounts/{account_id}

**Delete Account** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `account_id` | path | `string` | yes |  |
| `executeForAllReplicas` | query | `boolean` | no |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Responses:

- `204` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `404` [`account_not_found`](https://tickwire.io/docs/errors/account_not_found/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X DELETE 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "DELETE",
        "/users/current/accounts/YOUR_ACCOUNT_ID",
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("DELETE", "/users/current/accounts/YOUR_ACCOUNT_ID", {
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### PUT /users/current/accounts/{account_id}/credentials

**Set Credentials** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `account_id` | path | `string` | yes |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Request body: `Credentials` (required)

| Field | Type | Required | Description |
|---|---|---|---|
| `login` | `string \| integer \| null` | no |  |
| `password` | `string` | yes |  |

Responses:

- `200` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `404` [`account_not_found`](https://tickwire.io/docs/errors/account_not_found/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X PUT 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/credentials' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this' \
  -H 'Content-Type: application/json' \
  -d '{"password":"YOUR_PASSWORD"}'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "PUT",
        "/users/current/accounts/YOUR_ACCOUNT_ID/credentials",
        json={"password": "YOUR_PASSWORD"},
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("PUT", "/users/current/accounts/YOUR_ACCOUNT_ID/credentials", {
  body: {"password":"YOUR_PASSWORD"},
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### POST /users/current/accounts/{account_id}/deploy

**Deploy** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `account_id` | path | `string` | yes |  |
| `executeForAllReplicas` | query | `boolean` | no |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Responses:

- `204` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `404` [`account_not_found`](https://tickwire.io/docs/errors/account_not_found/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/deploy' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "POST",
        "/users/current/accounts/YOUR_ACCOUNT_ID/deploy",
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/deploy", {
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### POST /users/current/accounts/{account_id}/enable-account-features

**Enable Account Features** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `account_id` | path | `string` | yes |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Request body: `AccountFeatures` (required)

| Field | Type | Required | Description |
|---|---|---|---|
| `copyFactoryApi` | `CopyTradingEnable \| null` | no |  |
| `riskManagementApiEnabled` | `boolean \| null` | no |  |
| `metastatsApiEnabled` | `boolean \| null` | no |  |
| `reliabilityIncreased` | `boolean \| null` | no |  |
| `allocateDedicatedIp` | `"ipv4" \| "none" \| null` | no |  |

Responses:

- `204` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `404` [`account_not_found`](https://tickwire.io/docs/errors/account_not_found/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/enable-account-features' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "POST",
        "/users/current/accounts/YOUR_ACCOUNT_ID/enable-account-features",
        json={},
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/enable-account-features", {
  body: {},
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### POST /users/current/accounts/{account_id}/enable-copy-factory-api

**Enable the copy trading API** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `account_id` | path | `string` | yes |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Request body: `CopyTradingEnable` (required)

| Field | Type | Required | Description |
|---|---|---|---|
| `copyFactoryRoles` | `"PROVIDER" \| "SUBSCRIBER"[]` | yes |  |
| `copyFactoryResourceSlots` | `integer \| null` | no |  |

Responses:

- `204` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `404` [`account_not_found`](https://tickwire.io/docs/errors/account_not_found/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/enable-copy-factory-api' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this' \
  -H 'Content-Type: application/json' \
  -d '{"copyFactoryRoles":["PROVIDER"]}'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "POST",
        "/users/current/accounts/YOUR_ACCOUNT_ID/enable-copy-factory-api",
        json={"copyFactoryRoles": ["PROVIDER"]},
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/enable-copy-factory-api", {
  body: {"copyFactoryRoles":["PROVIDER"]},
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### POST /users/current/accounts/{account_id}/enable-metastats-api

**Enable the trading statistics API** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `account_id` | path | `string` | yes |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Responses:

- `204` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `404` [`account_not_found`](https://tickwire.io/docs/errors/account_not_found/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/enable-metastats-api' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "POST",
        "/users/current/accounts/YOUR_ACCOUNT_ID/enable-metastats-api",
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/enable-metastats-api", {
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### POST /users/current/accounts/{account_id}/enable-risk-management-api

**Enable Risk Management** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `account_id` | path | `string` | yes |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Responses:

- `204` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `404` [`account_not_found`](https://tickwire.io/docs/errors/account_not_found/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/enable-risk-management-api' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "POST",
        "/users/current/accounts/YOUR_ACCOUNT_ID/enable-risk-management-api",
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/enable-risk-management-api", {
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### POST /users/current/accounts/{account_id}/increase-reliability

**Increase Reliability** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `account_id` | path | `string` | yes |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Responses:

- `204` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `404` [`account_not_found`](https://tickwire.io/docs/errors/account_not_found/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/increase-reliability' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "POST",
        "/users/current/accounts/YOUR_ACCOUNT_ID/increase-reliability",
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/increase-reliability", {
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### POST /users/current/accounts/{account_id}/redeploy

**Redeploy** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `account_id` | path | `string` | yes |  |
| `executeForAllReplicas` | query | `boolean` | no |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Responses:

- `204` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `404` [`account_not_found`](https://tickwire.io/docs/errors/account_not_found/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/redeploy' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "POST",
        "/users/current/accounts/YOUR_ACCOUNT_ID/redeploy",
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/redeploy", {
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### POST /users/current/accounts/{account_id}/undeploy

**Undeploy** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `account_id` | path | `string` | yes |  |
| `executeForAllReplicas` | query | `boolean` | no |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Responses:

- `204` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `404` [`account_not_found`](https://tickwire.io/docs/errors/account_not_found/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X POST 'https://api.tickwire.io/users/current/accounts/YOUR_ACCOUNT_ID/undeploy' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "POST",
        "/users/current/accounts/YOUR_ACCOUNT_ID/undeploy",
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/accounts/YOUR_ACCOUNT_ID/undeploy", {
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### GET /users/current/provisioning-profiles

**List Profiles**

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `version` | query | `integer \| null` | no |  |
| `status` | query | `"new" \| "active" \| null` | no |  |
| `type` | query | `"mtTerminal" \| "managerApi" \| null` | no |  |
| `query` | query | `string \| null` | no |  |
| `offset` | query | `integer` | no |  |
| `limit` | query | `integer` | no |  |
| `api-version` | header | `string \| null` | no |  |

Responses:

- `200` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)

curl:

```bash
curl -sS -X GET 'https://api.tickwire.io/users/current/provisioning-profiles' \
  -H 'auth-token: YOUR_API_KEY'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "GET",
        "/users/current/provisioning-profiles",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("GET", "/users/current/provisioning-profiles");
console.log(result);
tw.close();
```

### POST /users/current/provisioning-profiles

**Create Profile** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Request body: `NewProfile` (required)

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | `string` | yes |  |
| `version` | `4 \| 5` | yes |  |
| `brokerTimezone` | `string` | yes |  |
| `brokerDSTSwitchTimezone` | `string` | yes |  |
| `type` | `"mtTerminal" \| "managerApi"` | no |  |
| `managerLogin` | `string \| null` | no |  |
| `managerPassword` | `string \| null` | no |  |
| `managerServer` | `string \| null` | no |  |

Responses:

- `201` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X POST 'https://api.tickwire.io/users/current/provisioning-profiles' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this' \
  -H 'Content-Type: application/json' \
  -d '{"name":"example","version":4,"brokerTimezone":"2026-09-01T00:00:00.000","brokerDSTSwitchTimezone":"2026-09-01T00:00:00.000","type":"mtTerminal"}'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "POST",
        "/users/current/provisioning-profiles",
        json={
            "name": "example",
            "version": 4,
            "brokerTimezone": "2026-09-01T00:00:00.000",
            "brokerDSTSwitchTimezone": "2026-09-01T00:00:00.000",
            "type": "mtTerminal",
        },
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("POST", "/users/current/provisioning-profiles", {
  body: {
    "name": "example",
    "version": 4,
    "brokerTimezone": "2026-09-01T00:00:00.000",
    "brokerDSTSwitchTimezone": "2026-09-01T00:00:00.000",
    "type": "mtTerminal"
  },
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### GET /users/current/provisioning-profiles/{profile_id}

**Get Profile**

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `profile_id` | path | `string` | yes |  |

Responses:

- `200` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)

curl:

```bash
curl -sS -X GET 'https://api.tickwire.io/users/current/provisioning-profiles/PROFILE_ID' \
  -H 'auth-token: YOUR_API_KEY'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "GET",
        "/users/current/provisioning-profiles/PROFILE_ID",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("GET", "/users/current/provisioning-profiles/PROFILE_ID");
console.log(result);
tw.close();
```

### PUT /users/current/provisioning-profiles/{profile_id}

**Update Profile** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `profile_id` | path | `string` | yes |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Request body: `UpdateProfile` (required)

| Field | Type | Required | Description |
|---|---|---|---|
| `name` | `string \| null` | no |  |
| `brokerTimezone` | `string \| null` | no |  |
| `brokerDSTSwitchTimezone` | `string \| null` | no |  |
| `managerLogin` | `string \| null` | no |  |
| `managerPassword` | `string \| null` | no |  |
| `managerServer` | `string \| null` | no |  |

Responses:

- `204` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X PUT 'https://api.tickwire.io/users/current/provisioning-profiles/PROFILE_ID' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "PUT",
        "/users/current/provisioning-profiles/PROFILE_ID",
        json={},
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("PUT", "/users/current/provisioning-profiles/PROFILE_ID", {
  body: {},
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### DELETE /users/current/provisioning-profiles/{profile_id}

**Delete Profile** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `profile_id` | path | `string` | yes |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Responses:

- `204` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X DELETE 'https://api.tickwire.io/users/current/provisioning-profiles/PROFILE_ID' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "DELETE",
        "/users/current/provisioning-profiles/PROFILE_ID",
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("DELETE", "/users/current/provisioning-profiles/PROFILE_ID", {
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```

### PUT /users/current/provisioning-profiles/{profile_id}/{file_name}

**Upload File** · takes `Idempotency-Key`

Auth: `auth-token`

| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
| `profile_id` | path | `string` | yes |  |
| `file_name` | path | `string` | yes |  |
| `Idempotency-Key` | header | `string \| null` | no | Optional; replays the first answer |
| `X-Actor` | header | `string \| null` | no | Who is acting (audit log) |
| `X-Reason` | header | `string \| null` | no | Why (audit log; percent-encode non-ASCII) |

Responses:

- `204` Successful Response
- `422` Validation Error (`HTTPValidationError`)

Common errors:

- `401` [`unauthorized`](https://tickwire.io/docs/errors/unauthorized/)
- `429` [`rate_limited`](https://tickwire.io/docs/errors/rate_limited/)
- `400, 422` [`validation_error`](https://tickwire.io/docs/errors/validation_error/)
- `409` [`idempotency_conflict`](https://tickwire.io/docs/errors/idempotency_conflict/)

curl:

```bash
curl -sS -X PUT 'https://api.tickwire.io/users/current/provisioning-profiles/PROFILE_ID/FILE_NAME' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'X-Reason: why you are doing this'
```

Python:

```python
from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "PUT",
        "/users/current/provisioning-profiles/PROFILE_ID/FILE_NAME",
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)
```

TypeScript:

```typescript
import { TickwireClient } from "@tickwire/sdk";

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("PUT", "/users/current/provisioning-profiles/PROFILE_ID/FILE_NAME", {
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
```
