View as Markdown

API reference / Account REST API (/users/current)

Tokens and discovery

Account REST API (/users/current). Generated from the OpenAPI document the services export (/openapi.json).

Samples use the placeholders YOUR_API_KEY and YOUR_ACCOUNT_ID. Paste a sandbox key (twsk_…) to fill them in and to use Try it. It stays in this browser tab and is only sent to the sandbox, never to the live API.

Try it is off in this build: No sandbox URL is configured for this build of the docs.

POST /users/current/narrow-down-auth-token

Narrow Down Idempotency-Key Auth: auth-token

Parameters of POST /users/current/narrow-down-auth-token
ParameterInTypeDescription
validity-in-hoursquerynumber
Idempotency-Keyheaderstring | nullOptional; replays the first answer
X-Actorheaderstring | nullWho is acting (audit log)
X-Reasonheaderstring | nullWhy (audit log; percent-encode non-ASCII)

Responses

Errors (common for this kind of call; every error uses one envelope)

curl

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

Python

from tickwire import Tickwire

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

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/narrow-down-auth-token", {
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
Try it in the sandbox

Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.

GET /users/current/regions

Regions Auth: auth-token

Responses

Errors (common for this kind of call; every error uses one envelope)

curl

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

Python

from tickwire import Tickwire

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

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/regions");
console.log(result);
tw.close();
Try it in the sandbox

Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.

GET /users/current/servers/mt-client-api

Client Api Domain Auth: auth-token

Responses

Errors (common for this kind of call; every error uses one envelope)

curl

curl -sS -X GET 'https://api.tickwire.io/users/current/servers/mt-client-api' \
  -H 'auth-token: YOUR_API_KEY'

Python

from tickwire import Tickwire

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

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/servers/mt-client-api");
console.log(result);
tw.close();
Try it in the sandbox

Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.

GET /users/current/tokens

List Tokens Auth: auth-token

Responses

Errors (common for this kind of call; every error uses one envelope)

curl

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

Python

from tickwire import Tickwire

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

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/tokens");
console.log(result);
tw.close();
Try it in the sandbox

Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.

POST /users/current/tokens

Create Token Idempotency-Key Auth: auth-token

Parameters of POST /users/current/tokens
ParameterInTypeDescription
Idempotency-Keyheaderstring | null

Request body NewToken required

Request body fields of POST /users/current/tokens
FieldTypeDescription
namestring
kind"api" | "account"
applicationsstring[] | null
rolesstring[] | null
accountIdsstring[] | null
readOnlyboolean
ttlInHoursnumber | null
ipAllowliststring[] | null

Responses

Errors (common for this kind of call; every error uses one envelope)

curl

curl -sS -X POST 'https://api.tickwire.io/users/current/tokens' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Idempotency-Key: my-request-1' \
  -H 'Content-Type: application/json' \
  -d '{"name":"","kind":"api","readOnly":false}'

Python

from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "POST",
        "/users/current/tokens",
        json={"name": "", "kind": "api", "readOnly": False},
        idempotency_key="my-request-1",
        reason="why you are doing this",
    )
    print(result)

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/tokens", {
  body: {"name":"","kind":"api","readOnly":false},
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
Try it in the sandbox

Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.

GET /users/current/tokens/{token_id}

Get Token Auth: auth-token

Parameters of GET /users/current/tokens/{token_id}
ParameterInTypeDescription
token_id requiredpathstring

Responses

Errors (common for this kind of call; every error uses one envelope)

curl

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

Python

from tickwire import Tickwire

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

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/tokens/TOKEN_ID");
console.log(result);
tw.close();
Try it in the sandbox

Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.

PATCH /users/current/tokens/{token_id}

Patch Token Auth: auth-token

Parameters of PATCH /users/current/tokens/{token_id}
ParameterInTypeDescription
token_id requiredpathstring

Request body PatchToken required

Request body fields of PATCH /users/current/tokens/{token_id}
FieldTypeDescription
namestring | null
ipAllowliststring[] | null

Responses

Errors (common for this kind of call; every error uses one envelope)

curl

curl -sS -X PATCH 'https://api.tickwire.io/users/current/tokens/TOKEN_ID' \
  -H 'auth-token: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{}'

Python

from tickwire import Tickwire

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

TypeScript

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

const tw = new TickwireClient({ baseUrl: "https://api.tickwire.io", token: "YOUR_API_KEY" });
const result = await tw.request("PATCH", "/users/current/tokens/TOKEN_ID", {
  body: {},
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
Try it in the sandbox

Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.

DELETE /users/current/tokens/{token_id}

Revoke Token Auth: auth-token

Parameters of DELETE /users/current/tokens/{token_id}
ParameterInTypeDescription
token_id requiredpathstring

Responses

Errors (common for this kind of call; every error uses one envelope)

curl

curl -sS -X DELETE 'https://api.tickwire.io/users/current/tokens/TOKEN_ID' \
  -H 'auth-token: YOUR_API_KEY'

Python

from tickwire import Tickwire

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

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/tokens/TOKEN_ID", {
  idempotencyKey: "my-request-1",
  reason: "why you are doing this",
});
console.log(result);
tw.close();
Try it in the sandbox

Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.

GET /v1/access-rule-manifest

Access Rule Manifest Auth: X-API-Key

Responses

Errors (common for this kind of call; every error uses one envelope)

curl

curl -sS -X GET 'https://api.tickwire.io/v1/access-rule-manifest' \
  -H 'X-API-Key: YOUR_API_KEY'

Python

from tickwire import Tickwire

with Tickwire("https://api.tickwire.io", "YOUR_API_KEY") as tw:
    result = tw.request(
        "GET",
        "/v1/access-rule-manifest",
    )
    print(result)

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", "/v1/access-rule-manifest");
console.log(result);
tw.close();
Try it in the sandbox

Try it is off in this build of the docs: no sandbox URL is configured. The samples above work against the sandbox with your sandbox key.