# Zilfu — API tokens

2 operations. Schemas referenced below are documented at https://zilfu.app/docs/api/schemas.md.

## Servers

- `https://zilfu.app/api`

## Operations

### Create an API token

- **Method:** `POST`
- **Path:** `/api-tokens`
- **Tags:** ApiToken

#### Request Body

##### Content-Type: application/json

- **`name` (required)**

  `string`

**Example:**

```json
{
  "name": ""
}
```

#### Responses

##### Status: 200

###### Content-Type: application/json

**Example:**

```json
null
```

##### Status: 401 Unauthenticated

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```

##### Status: 422 Validation error

###### Content-Type: application/json

- **`errors` (required)**

  `object` — A detailed description of each field that failed validation.

- **`message` (required)**

  `string` — Errors overview.

**Example:**

```json
{
  "message": "",
  "errors": {
    "additionalProperty": [
      ""
    ]
  }
}
```

### Revoke an API token

- **Method:** `DELETE`
- **Path:** `/api-tokens/{tokenId}`
- **Tags:** ApiToken

#### Parameters

##### `tokenId` required

- **In:** `path`

`string`

#### Responses

##### Status: 200

###### Content-Type: application/json

**Example:**

```json
null
```

##### Status: 401 Unauthenticated

###### Content-Type: application/json

- **`message` (required)**

  `string` — Error overview.

**Example:**

```json
{
  "message": ""
}
```
