> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# PassSlot API reference

> API reference for the PassSlot plugin in Corsair: every `passslot.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Passes

### byPassType

`passes.byPassType`

List passes by pass type

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.passes.byPassType({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   serialNumber: string,
>   passType?: string | null,
>   passTypeIdentifier?: string | null,
>   url?: string | null
> }[]
> ```

***

### createFromTemplate

`passes.createFromTemplate`

Create pass from template

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passes.createFromTemplate({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `body` | `Record<string, JsonValue>` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `serialNumber` | `string` | Yes | — |
| `passType` | `string \| null` | No | — |
| `passTypeIdentifier` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |

***

### createFromTemplateName

`passes.createFromTemplateName`

Create pass from template name

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passes.createFromTemplateName({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `body` | `Record<string, JsonValue>` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `serialNumber` | `string` | Yes | — |
| `passType` | `string \| null` | No | — |
| `passTypeIdentifier` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |

***

### createFromTemplateNameWithImages

`passes.createFromTemplateNameWithImages`

Create pass from template name with images

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passes.createFromTemplateNameWithImages({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   values: Record<string, JsonValue>,
>   images?: Record<icon | icon@2x | logo | logo@2x | thumbnail | thumbnail@2x | background | background@2x | footer | footer@2x | strip | strip@2x, string>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `serialNumber` | `string` | Yes | — |
| `passType` | `string \| null` | No | — |
| `passTypeIdentifier` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |

***

### createFromTemplateWithImages

`passes.createFromTemplateWithImages`

Create pass from template with images

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passes.createFromTemplateWithImages({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `body` | `object` | Yes | — |

Provide template values and optional PNG images encoded as base64. PassSlot expects named multipart fields for the JSON values and each image.

> [accordion] body full type
>
> ```ts theme={null}
> {
>   values: Record<string, JsonValue>,
>   images?: Record<icon | icon@2x | logo | logo@2x | thumbnail | thumbnail@2x | background | background@2x | footer | footer@2x | strip | strip@2x, string>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `serialNumber` | `string` | Yes | — |
| `passType` | `string \| null` | No | — |
| `passTypeIdentifier` | `string \| null` | No | — |
| `url` | `string \| null` | No | — |

***

### delete

`passes.delete`

Delete pass

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passes.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bytes: custom
> }
> ```

***

### deletePrice

`passes.deletePrice`

Delete pass price

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passes.deletePrice({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bytes: custom
> }
> ```

***

### download

`passes.download`

Show pass

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.passes.download({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `base64` | `string` | Yes | — |
| `contentType` | `string \| null` | Yes | — |

***

### email

`passes.email`

Email pass

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passes.email({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   email: string
> }
> ```

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bytes: custom
> }
> ```

***

### getJson

`passes.getJson`

Show pass json

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.passes.getJson({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `serialNumber` | `string \| null` | No | — |
| `passTypeIdentifier` | `string \| null` | No | — |
| `generic` | `object \| null` | No | — |
| `coupon` | `object \| null` | No | — |
| `storeCard` | `object \| null` | No | — |
| `eventTicket` | `object \| null` | No | — |
| `boardingPass` | `object \| null` | No | — |

> [accordion] generic full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] coupon full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] storeCard full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] eventTicket full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] boardingPass full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### getPrice

`passes.getPrice`

Show pass price

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.passes.getPrice({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `price` | `number \| null` | No | — |

***

### getStatus

`passes.getStatus`

Show pass status

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.passes.getStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | Yes | — |

***

### getUrl

`passes.getUrl`

Show pass url

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.passes.getUrl({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | — |

***

### getValues

`passes.getValues`

Show pass values

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.passes.getValues({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |

**Output:** *empty object*

***

### list

`passes.list`

List passes

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.passes.list({});
```

**Input:** *empty object*

Lists passes across all pass types. The provider does not document pagination for this route.

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   serialNumber: string,
>   passType?: string | null,
>   passTypeIdentifier?: string | null,
>   url?: string | null
> }[]
> ```

***

### push

`passes.push`

Push pass

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passes.push({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bytes: custom
> }
> ```

***

### updatePrice

`passes.updatePrice`

Update pass price

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passes.updatePrice({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   price: number
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `price` | `number \| null` | No | — |

***

### updateStatus

`passes.updateStatus`

Update pass status

**Risk:** `write`

```ts theme={null}
await corsair.passslot.api.passes.updateStatus({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   status: valid | invalid | redeemed | unpaid | locked | incomplete
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `status` | `string` | Yes | — |

***

### updateValue

`passes.updateValue`

Update pass value

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passes.updateValue({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |
| `placeholderName` | `string` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   value: JsonValue
> }
> ```

**Output:** *empty object*

***

### updateValues

`passes.updateValues`

Update pass values

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passes.updateValues({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |
| `body` | `Record<string, JsonValue>` | Yes | — |

**Output:** *empty object*

***

## Pass Images

### delete

`passImages.delete`

Delete pass image by type and resolution

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passImages.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |
| `type` | `icon \| logo \| thumbnail \| background \| footer \| strip` | Yes | — |
| `resolution` | `normal \| high` | Yes | — |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bytes: custom
> }
> ```

***

### deleteAll

`passImages.deleteAll`

Delete pass images

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passImages.deleteAll({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bytes: custom
> }
> ```

***

### deleteByType

`passImages.deleteByType`

Delete pass image by type

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passImages.deleteByType({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |
| `type` | `icon \| logo \| thumbnail \| background \| footer \| strip` | Yes | — |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bytes: custom
> }
> ```

***

### download

`passImages.download`

Show pass image by type and resolution

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.passImages.download({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |
| `type` | `icon \| logo \| thumbnail \| background \| footer \| strip` | Yes | — |
| `resolution` | `normal \| high` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `base64` | `string` | Yes | — |
| `contentType` | `string \| null` | Yes | — |

***

### list

`passImages.list`

List pass images

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.passImages.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   urls?: Record<string, string> | null
> }[]
> ```

***

### listByType

`passImages.listByType`

Show pass image by type

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.passImages.listByType({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |
| `type` | `icon \| logo \| thumbnail \| background \| footer \| strip` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   urls?: Record<string, string> | null
> }[]
> ```

***

### set

`passImages.set`

Set pass image by type and resolution

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.passImages.set({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `passTypeIdentifier` | `string` | Yes | — |
| `serialNumber` | `string` | Yes | — |
| `type` | `icon \| logo \| thumbnail \| background \| footer \| strip` | Yes | — |
| `resolution` | `normal \| high` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   image: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | — |
| `urls` | `Record<string, string> \| null` | No | — |

***

## Pass Types

### get

`passTypes.get`

Show pass type

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.passTypes.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number` | Yes | — |
| `organizationName` | `string \| null` | No | — |
| `teamIdentifier` | `string \| null` | No | — |
| `certificateExpirationDate` | `string \| null` | No | — |

***

### list

`passTypes.list`

List pass types

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.passTypes.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id: string | number,
>   organizationName?: string | null,
>   teamIdentifier?: string | null,
>   certificateExpirationDate?: string | null
> }[]
> ```

***

## Scanners

### create

`scanners.create`

Create scanner

**Risk:** `write`

```ts theme={null}
await corsair.passslot.api.scanners.create({ name: 'Front desk', type: 'PassVerifier', fullAccess: true });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `type` | `PassVerifier \| Browser` | Yes | — |
| `fullAccess` | `boolean` | Yes | — |
| `allowedTemplates` | `number[]` | No | — |

Choose PassVerifier or Browser. If fullAccess is false, include allowedTemplates with numeric template IDs.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number` | Yes | — |
| `name` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `fullAccess` | `boolean \| null` | No | — |
| `allowedTemplates` | `(string \| number)[] \| null` | No | — |

***

### delete

`scanners.delete`

Delete scanner

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.scanners.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bytes: custom
> }
> ```

***

### get

`scanners.get`

Show scanner

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.scanners.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number` | Yes | — |
| `name` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `fullAccess` | `boolean \| null` | No | — |
| `allowedTemplates` | `(string \| number)[] \| null` | No | — |

***

### list

`scanners.list`

List scanners

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.scanners.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id: string | number,
>   name?: string | null,
>   type?: string | null,
>   fullAccess?: boolean | null,
>   allowedTemplates?: (string | number)[] | null
> }[]
> ```

***

### update

`scanners.update`

Update scanner

**Risk:** `write`

```ts theme={null}
await corsair.passslot.api.scanners.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `name` | `string` | No | — |
| `fullAccess` | `boolean` | No | — |
| `allowedTemplates` | `number[]` | No | — |

When fullAccess is false, include allowedTemplates as a non-empty list of positive integer template IDs. An update that only changes the name can omit allowedTemplates.

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number` | Yes | — |
| `name` | `string \| null` | No | — |
| `type` | `string \| null` | No | — |
| `fullAccess` | `boolean \| null` | No | — |
| `allowedTemplates` | `(string \| number)[] \| null` | No | — |

***

## Template Images

### delete

`templateImages.delete`

Delete template image by type and resolution

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.templateImages.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `type` | `icon \| logo \| thumbnail \| background \| footer \| strip` | Yes | — |
| `resolution` | `normal \| high` | Yes | — |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bytes: custom
> }
> ```

***

### deleteAll

`templateImages.deleteAll`

Delete template images

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.templateImages.deleteAll({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bytes: custom
> }
> ```

***

### deleteByType

`templateImages.deleteByType`

Delete template image by type

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.templateImages.deleteByType({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `type` | `icon \| logo \| thumbnail \| background \| footer \| strip` | Yes | — |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bytes: custom
> }
> ```

***

### download

`templateImages.download`

Show template image by type and resolution

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.templateImages.download({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `type` | `icon \| logo \| thumbnail \| background \| footer \| strip` | Yes | — |
| `resolution` | `normal \| high` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `base64` | `string` | Yes | — |
| `contentType` | `string \| null` | Yes | — |

***

### list

`templateImages.list`

List template images

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.templateImages.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   urls?: Record<string, string> | null
> }[]
> ```

***

### listByType

`templateImages.listByType`

Show template image by type

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.templateImages.listByType({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `type` | `icon \| logo \| thumbnail \| background \| footer \| strip` | Yes | — |

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   type?: string | null,
>   urls?: Record<string, string> | null
> }[]
> ```

***

### set

`templateImages.set`

Set template image by type and resolution

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.templateImages.set({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `type` | `icon \| logo \| thumbnail \| background \| footer \| strip` | Yes | — |
| `resolution` | `normal \| high` | Yes | — |
| `body` | `object` | Yes | — |

Template images appear on every pass created from the template, and PassSlot pushes the change to those passes. Marked destructive for that reason.

> [accordion] body full type
>
> ```ts theme={null}
> {
>   image: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `type` | `string \| null` | No | — |
| `urls` | `Record<string, string> \| null` | No | — |

***

## Templates

### create

`templates.create`

Create template

**Risk:** `write`

```ts theme={null}
await corsair.passslot.api.templates.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name: string,
>   passType: string,
>   description: Record<string, JsonValue>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number` | Yes | — |
| `name` | `string \| null` | No | — |
| `passType` | `string \| null` | No | — |
| `formatVersion` | `number \| null` | No | — |
| `description` | `object \| null` | No | — |
| `placeholder` | `string[] \| null` | No | — |

> [accordion] description full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### delete

`templates.delete`

Delete template

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.templates.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bytes: custom
> }
> ```

***

### deleteBrandingFooter

`templates.deleteBrandingFooter`

Delete template branding footer image

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.templates.deleteBrandingFooter({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `titleText` | `string \| null` | No | — |
| `headerText` | `string \| null` | No | — |
| `bodyTextColor` | `string \| null` | No | — |
| `footerTextColor` | `string \| null` | No | — |
| `footerBackgroundColor` | `string \| null` | No | — |
| `footerImage` | `string \| null` | No | — |

***

### get

`templates.get`

Show template

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.templates.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number` | Yes | — |
| `name` | `string \| null` | No | — |
| `passType` | `string \| null` | No | — |
| `formatVersion` | `number \| null` | No | — |
| `description` | `object \| null` | No | — |
| `placeholder` | `string[] \| null` | No | — |

> [accordion] description full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### getActions

`templates.getActions`

Show template actions

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.templates.getActions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `redeem` | `boolean \| null` | No | — |
| `reactivate` | `boolean \| null` | No | — |
| `updateFields` | `object[] \| null` | No | — |

> [accordion] updateFields full type
>
> ```ts theme={null}
> {
>   name?: string | null
> }[] | null
> ```

***

### getBranding

`templates.getBranding`

Show template branding settings

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.templates.getBranding({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `titleText` | `string \| null` | No | — |
| `headerText` | `string \| null` | No | — |
| `bodyTextColor` | `string \| null` | No | — |
| `footerTextColor` | `string \| null` | No | — |
| `footerBackgroundColor` | `string \| null` | No | — |
| `footerImage` | `string \| null` | No | — |

***

### getPayment

`templates.getPayment`

Show template payment settings

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.templates.getPayment({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `enabled` | `boolean \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `price` | `number \| null` | No | — |
| `provider` | `string \| null` | No | — |

***

### getRestrictions

`templates.getRestrictions`

Show template restrictions

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.templates.getRestrictions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `quantityRestriction` | `number \| null` | No | — |
| `redemptionRestriction` | `number \| null` | No | — |
| `dateRestriction` | `string \| null` | No | — |
| `sharingRestriction` | `boolean \| null` | No | — |

***

### getUrl

`templates.getUrl`

Show template url

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.templates.getUrl({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `url` | `string` | Yes | — |

***

### list

`templates.list`

List templates

**Risk:** `read`

```ts theme={null}
await corsair.passslot.api.templates.list({});
```

**Input:** *empty object*

**Output:** `object[]`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   id: string | number,
>   name?: string | null,
>   passType?: string | null,
>   formatVersion?: number | null,
>   description?: {
>   } | null,
>   placeholder?: string[] | null
> }[]
> ```

***

### setBrandingFooter

`templates.setBrandingFooter`

Update template branding footer image

**Risk:** `write`

```ts theme={null}
await corsair.passslot.api.templates.setBrandingFooter({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   image: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `titleText` | `string \| null` | No | — |
| `headerText` | `string \| null` | No | — |
| `bodyTextColor` | `string \| null` | No | — |
| `footerTextColor` | `string \| null` | No | — |
| `footerBackgroundColor` | `string \| null` | No | — |
| `footerImage` | `string \| null` | No | — |

***

### update

`templates.update`

Update template

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.templates.update({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `body` | `object` | Yes | — |

PassSlot pushes template changes to every pass created from the template, so holders can get a Wallet notification. Marked destructive for that reason.

> [accordion] body full type
>
> ```ts theme={null}
> {
>   name: string,
>   passType: string,
>   description: Record<string, JsonValue>,
>   id?: number | string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string \| number` | Yes | — |
| `name` | `string \| null` | No | — |
| `passType` | `string \| null` | No | — |
| `formatVersion` | `number \| null` | No | — |
| `description` | `object \| null` | No | — |
| `placeholder` | `string[] \| null` | No | — |

> [accordion] description full type
>
> ```ts theme={null}
> {
> } | null
> ```

***

### updateActions

`templates.updateActions`

Update template actions

**Risk:** `write`

```ts theme={null}
await corsair.passslot.api.templates.updateActions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   redeem?: boolean,
>   reactivate?: boolean,
>   updateFields?: {
>     name: string
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `redeem` | `boolean \| null` | No | — |
| `reactivate` | `boolean \| null` | No | — |
| `updateFields` | `object[] \| null` | No | — |

> [accordion] updateFields full type
>
> ```ts theme={null}
> {
>   name?: string | null
> }[] | null
> ```

***

### updateBranding

`templates.updateBranding`

Update template branding settings

**Risk:** `write`

```ts theme={null}
await corsair.passslot.api.templates.updateBranding({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   titleText?: string,
>   headerText?: string,
>   bodyTextColor?: string,
>   footerTextColor?: string,
>   footerBackgroundColor?: string
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `titleText` | `string \| null` | No | — |
| `headerText` | `string \| null` | No | — |
| `bodyTextColor` | `string \| null` | No | — |
| `footerTextColor` | `string \| null` | No | — |
| `footerBackgroundColor` | `string \| null` | No | — |
| `footerImage` | `string \| null` | No | — |

***

### updatePayment

`templates.updatePayment`

Update template payment settings

**Risk:** `destructive`

```ts theme={null}
await corsair.passslot.api.templates.updatePayment({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   enabled?: boolean,
>   currency?: string,
>   price?: number,
>   provider?: PayPalNVP | Stripe | PAYMILL,
>   providerSettings?: Record<string, JsonValue>
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `enabled` | `boolean \| null` | No | — |
| `currency` | `string \| null` | No | — |
| `price` | `number \| null` | No | — |
| `provider` | `string \| null` | No | — |

***

### updateRestrictions

`templates.updateRestrictions`

Replace all template restrictions. Omitted restrictions are disabled.

**Risk:** `write`

```ts theme={null}
await corsair.passslot.api.templates.updateRestrictions({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `number \| string` | Yes | — |
| `body` | `object` | Yes | — |

> [accordion] body full type
>
> ```ts theme={null}
> {
>   quantityRestriction?: number,
>   redemptionRestriction?: number,
>   passwordProtection?: string,
>   dateRestriction?: string,
>   sharingRestriction?: boolean
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `quantityRestriction` | `number \| null` | No | — |
| `redemptionRestriction` | `number \| null` | No | — |
| `dateRestriction` | `string \| null` | No | — |
| `sharingRestriction` | `boolean \| null` | No | — |

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.