> ## 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.

# Ghost API reference

> API reference for the Ghost plugin in Corsair: every `ghost.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).

## Content

### authors.get

`content.authors.get`

Read a published author by id. Content API. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.authors.get({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `authors` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] authors full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   email?: string | null,
>   profile_image?: string | null,
>   cover_image?: string | null,
>   bio?: string | null,
>   website?: string | null,
>   location?: string | null,
>   facebook?: string | null,
>   twitter?: string | null,
>   accessibility?: string | null,
>   status?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   tour?: string | null,
>   last_seen?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   roles?: {
>   }[] | null,
>   url?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### authors.getBySlug

`content.authors.getBySlug`

Read a published author by slug. Content API. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.authors.getBySlug({ slug: 'welcome' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `authors` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] authors full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   email?: string | null,
>   profile_image?: string | null,
>   cover_image?: string | null,
>   bio?: string | null,
>   website?: string | null,
>   location?: string | null,
>   facebook?: string | null,
>   twitter?: string | null,
>   accessibility?: string | null,
>   status?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   tour?: string | null,
>   last_seen?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   roles?: {
>   }[] | null,
>   url?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### authors.list

`content.authors.list`

Browse published authors. Content API: public content only. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.authors.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `authors` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] authors full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   email?: string | null,
>   profile_image?: string | null,
>   cover_image?: string | null,
>   bio?: string | null,
>   website?: string | null,
>   location?: string | null,
>   facebook?: string | null,
>   twitter?: string | null,
>   accessibility?: string | null,
>   status?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   tour?: string | null,
>   last_seen?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   roles?: {
>   }[] | null,
>   url?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### pages.get

`content.pages.get`

Read a published page by id. Content API. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.pages.get({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `formats` | `string` | No | Content formats to return, comma-separated: lexical (default), html, mobiledoc, plaintext. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pages` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] pages full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### pages.getBySlug

`content.pages.getBySlug`

Read a published page by slug. Content API. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.pages.getBySlug({ slug: 'welcome' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `formats` | `string` | No | Content formats to return, comma-separated: lexical (default), html, mobiledoc, plaintext. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pages` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] pages full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### pages.list

`content.pages.list`

Browse published pages. Content API: public content only. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.pages.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |
| `formats` | `string` | No | Content formats to return, comma-separated: lexical (default), html, mobiledoc, plaintext. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pages` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] pages full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### posts.get

`content.posts.get`

Read a published post by id. Content API. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.posts.get({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `formats` | `string` | No | Content formats to return, comma-separated: lexical (default), html, mobiledoc, plaintext. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `posts` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] posts full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### posts.getBySlug

`content.posts.getBySlug`

Read a published post by slug. Content API. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.posts.getBySlug({ slug: 'welcome' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `formats` | `string` | No | Content formats to return, comma-separated: lexical (default), html, mobiledoc, plaintext. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `posts` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] posts full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### posts.list

`content.posts.list`

Browse published posts. Content API: public content only. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.posts.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |
| `formats` | `string` | No | Content formats to return, comma-separated: lexical (default), html, mobiledoc, plaintext. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `posts` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] posts full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### settings.get

`content.settings.get`

Read public settings. Content API: title, description, logo, navigation and the other public settings. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.settings.get({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `settings` | `object \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] settings full type
>
> ```ts theme={null}
> {
>   title?: string | null,
>   description?: string | null,
>   logo?: string | null,
>   icon?: string | null,
>   accent_color?: string | null,
>   cover_image?: string | null,
>   facebook?: string | null,
>   twitter?: string | null,
>   lang?: string | null,
>   locale?: string | null,
>   timezone?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   navigation?: {
>   }[] | null,
>   secondary_navigation?: {
>   }[] | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   members_support_address?: string | null,
>   url?: string | null
> } | null
> ```

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

***

### tags.get

`content.tags.get`

Read a published tag by id. Content API. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.tags.get({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   feature_image?: string | null,
>   visibility?: string | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   canonical_url?: string | null,
>   accent_color?: string | null,
>   url?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### tags.getBySlug

`content.tags.getBySlug`

Read a published tag by slug. Content API. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.tags.getBySlug({ slug: 'welcome' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   feature_image?: string | null,
>   visibility?: string | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   canonical_url?: string | null,
>   accent_color?: string | null,
>   url?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### tags.list

`content.tags.list`

Browse published tags. Content API: public content only. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.tags.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   feature_image?: string | null,
>   visibility?: string | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   canonical_url?: string | null,
>   accent_color?: string | null,
>   url?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### tiers.list

`content.tiers.list`

Browse tiers. Content API: the public tiers and their prices. Uses the Content API key.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.content.tiers.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tiers` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] tiers full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   active?: boolean | null,
>   type?: string | null,
>   welcome_page_url?: string | null,
>   visibility?: string | null,
>   monthly_price?: number | null,
>   yearly_price?: number | null,
>   currency?: string | null,
>   trial_days?: number | null,
>   benefits?: string[] | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

## Files

### upload

`files.upload`

Upload a file. Any file for a file card. Returns its URL.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.files.upload({
	file: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.txt', contentType: 'text/plain' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file` | `string \| object \| custom` | Yes | The file. |
| `ref` | `string` | No | — |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `files` | `object[] \| null` | No | — |

> [accordion] files full type
>
> ```ts theme={null}
> {
>   url?: string | null,
>   ref?: string | null
> }[] | null
> ```

***

## Images

### upload

`images.upload`

Upload an image. Returns the image URL to use in posts. JPEG, PNG, GIF, SVG, WebP (icon: also ICO).

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.images.upload({
	file: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.txt', contentType: 'text/plain' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file` | `string \| object \| custom` | Yes | The file. |
| `purpose` | `image \| profile_image \| icon` | No | Changes the checks Ghost runs (image by default). |
| `ref` | `string` | No | Returned as-is: the original path, to replace it in your content. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `images` | `object[] \| null` | No | — |

> [accordion] images full type
>
> ```ts theme={null}
> {
>   url?: string | null,
>   ref?: string | null
> }[] | null
> ```

***

## Invites

### create

`invites.create`

Invite a staff user. Emails an invitation to join the site with the given role. Ghost emails the invitation; a site without mail set up answers 500 "Error sending email!".

**Risk:** `destructive`

```ts theme={null}
await corsair.ghost.api.invites.create({ role_id: 'example', email: 'ada@example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `role_id` | `string` | Yes | — |
| `status` | `string` | No | — |
| `email` | `string` | Yes | — |
| `expires` | `number` | No | — |
| `updated_at` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invites` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] invites full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   role_id?: string | null,
>   status?: string | null,
>   email?: string | null,
>   expires?: number | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### delete

`invites.delete`

Revoke a staff invitation. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.ghost.api.invites.delete({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Ghost accepted the call; it answered with no body. |

***

### list

`invites.list`

Browse pending staff invitations. Needs a staff access token: an integration key answers 403 (live 11-28).

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.invites.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invites` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] invites full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   role_id?: string | null,
>   status?: string | null,
>   email?: string | null,
>   expires?: number | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

## Labels

### create

`labels.create`

Add a label. (POST /admin/labels/)

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.labels.create({ name: 'casper' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `slug` | `string` | No | — |
| `updated_at` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `labels` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] labels full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### delete

`labels.delete`

Delete a label. Cannot be undone. (DELETE /admin/labels/\{id}/)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.ghost.api.labels.delete({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Ghost accepted the call; it answered with no body. |

***

### get

`labels.get`

Read a label by id. (GET /admin/labels/\{id}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.labels.get({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `labels` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] labels full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### getBySlug

`labels.getBySlug`

Read a label by slug. (GET /admin/labels/slug/\{slug}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.labels.getBySlug({ slug: 'welcome' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `labels` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] labels full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### list

`labels.list`

Browse labels. Lists labels, 15 per page by default.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.labels.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `labels` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] labels full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### update

`labels.update`

Edit a label. Send updated\_at as read: a stale value answers 409, so two edits never overwrite each other silently.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.labels.update({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `slug` | `string` | No | — |
| `updated_at` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `labels` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] labels full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

## Media

### upload

`media.upload`

Upload a video or audio file. MP4, WebM, OGG, MP3, WAV, M4A. Returns the file URL.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.media.upload({
	file: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.txt', contentType: 'text/plain' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file` | `string \| object \| custom` | Yes | The file. |
| `ref` | `string` | No | — |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `media` | `object[] \| null` | No | — |

> [accordion] media full type
>
> ```ts theme={null}
> {
>   url?: string | null,
>   ref?: string | null
> }[] | null
> ```

***

## Members

### create

`members.create`

Add a member. With send\_email true, Ghost emails the member a sign-in link.

**Risk:** `destructive`

```ts theme={null}
await corsair.ghost.api.members.create({
	email: 'ada@example.com',
	name: 'Ada',
	labels: ['vip'],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `send_email` | `boolean` | No | true: email the member a sign-in link. |
| `email_type` | `signin \| signup \| subscribe` | No | Which email send\_email sends. |
| `email` | `string` | Yes | — |
| `name` | `string` | No | — |
| `note` | `string` | No | — |
| `subscribed` | `boolean` | No | — |
| `status` | `free \| paid \| comped \| gift` | No | — |
| `updated_at` | `string` | No | — |
| `labels` | `object[]` | No | — |
| `comped` | `boolean` | No | — |
| `commenting` | `object` | No | — |
| `newsletters` | `object[]` | No | — |
| `tiers` | `object[]` | No | — |
| `metafields` | `object` | No | — |

> [accordion] labels full type
>
> ```ts theme={null}
> (
>   {
>     id?: string,
>     name?: string,
>     slug?: string,
>     created_at?: string,
>     updated_at?: string
>   } | string
> )[]
> ```

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

> [accordion] newsletters full type
>
> ```ts theme={null}
> (
>   {
>     id?: string,
>     uuid?: string,
>     name?: string,
>     slug?: string,
>     description?: string,
>     sender_name?: string,
>     sender_email?: string,
>     sender_reply_to?: string,
>     status?: active | archived,
>     visibility?: string,
>     subscribe_on_signup?: boolean,
>     sort_order?: number,
>     header_image?: string,
>     show_header_icon?: boolean,
>     show_header_title?: boolean,
>     title_font_category?: string,
>     title_alignment?: string,
>     show_feature_image?: boolean,
>     body_font_category?: string,
>     footer_content?: string,
>     show_badge?: boolean,
>     show_header_name?: boolean,
>     created_at?: string,
>     updated_at?: string,
>     count?: {
>     }
>   } | {
>   }
> )[]
> ```

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

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `members` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] members full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   email?: string | null,
>   name?: string | null,
>   note?: string | null,
>   geolocation?: string | null,
>   subscribed?: boolean | null,
>   status?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   labels?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     } | string
>   )[] | null,
>   subscriptions?: {
>   }[] | null,
>   avatar_image?: string | null,
>   email_count?: number | null,
>   email_opened_count?: number | null,
>   email_open_rate?: number | null,
>   last_seen_at?: string | null,
>   comped?: boolean | null,
>   unsubscribe_url?: string | null,
>   can_comment?: boolean | null,
>   commenting?: {
>   } | null,
>   email_suppression?: {
>   } | null,
>   newsletters?: (
>     {
>       id?: string | null,
>       uuid?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       sender_name?: string | null,
>       sender_email?: string | null,
>       sender_reply_to?: string | null,
>       status?: string | null,
>       visibility?: string | null,
>       subscribe_on_signup?: boolean | null,
>       sort_order?: number | null,
>       header_image?: string | null,
>       show_header_icon?: boolean | null,
>       show_header_title?: boolean | null,
>       title_font_category?: string | null,
>       title_alignment?: string | null,
>       show_feature_image?: boolean | null,
>       body_font_category?: string | null,
>       footer_content?: string | null,
>       show_badge?: boolean | null,
>       show_header_name?: boolean | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | {
>     }
>   )[] | null,
>   tiers?: {
>   }[] | null,
>   metafields?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### customFields.create

`members.customFields.create`

Add a member custom field. The key is made from the name and never changes.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.members.customFields.create({ name: 'casper', type: 'short_text' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `namespace` | `string` | No | — |
| `key` | `string` | No | — |
| `name` | `string` | Yes | — |
| `type` | `short_text \| long_text \| list \| address \| phone` | Yes | — |
| `settings` | `object` | No | — |
| `status` | `active \| archived` | No | — |
| `access` | `object` | No | — |
| `updated_at` | `string` | No | — |

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

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `members_metafields` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] members\_metafields full type
>
> ```ts theme={null}
> {
>   namespace?: string | null,
>   key?: string | null,
>   name?: string | null,
>   type?: string | null,
>   settings?: {
>   } | null,
>   status?: string | null,
>   access?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### customFields.delete

`members.customFields.delete`

Delete a member custom field. Deletes the field and every member's value for it. Archive the field first (status archived): an active field answers 422. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.ghost.api.members.customFields.delete({ key: 'company' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Ghost accepted the call; it answered with no body. |

***

### customFields.get

`members.customFields.get`

Read a member custom field. (GET /admin/members/metafields/custom/\{key}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.members.customFields.get({ key: 'company' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `members_metafields` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] members\_metafields full type
>
> ```ts theme={null}
> {
>   namespace?: string | null,
>   key?: string | null,
>   name?: string | null,
>   type?: string | null,
>   settings?: {
>   } | null,
>   status?: string | null,
>   access?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### customFields.list

`members.customFields.list`

Browse member custom fields. Active fields by default; filter status:archived or status:\[active,archived].

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.members.customFields.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `filter` | `string` | No | status:archived or status:\[active,archived]. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `members_metafields` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] members\_metafields full type
>
> ```ts theme={null}
> {
>   namespace?: string | null,
>   key?: string | null,
>   name?: string | null,
>   type?: string | null,
>   settings?: {
>   } | null,
>   status?: string | null,
>   access?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### customFields.reorder

`members.customFields.reorder`

Reorder member custom fields. Send every active field in the new order.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.members.customFields.reorder({
	members_metafields: [{ key: 'company' }],
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `members_metafields` | `object[]` | Yes | — |

> [accordion] members\_metafields full type
>
> ```ts theme={null}
> {
>   key: string
> }[]
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `members_metafields` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] members\_metafields full type
>
> ```ts theme={null}
> {
>   namespace?: string | null,
>   key?: string | null,
>   name?: string | null,
>   type?: string | null,
>   settings?: {
>   } | null,
>   status?: string | null,
>   access?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### customFields.update

`members.customFields.update`

Edit a member custom field. Rename it, change its options or access, or archive it (status archived).

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.members.customFields.update({ key: 'company' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `key` | `string` | Yes | — |
| `namespace` | `string` | No | — |
| `name` | `string` | No | — |
| `type` | `short_text \| long_text \| list \| address \| phone` | No | — |
| `settings` | `object` | No | — |
| `status` | `active \| archived` | No | — |
| `access` | `object` | No | — |
| `updated_at` | `string` | No | — |

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

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `members_metafields` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] members\_metafields full type
>
> ```ts theme={null}
> {
>   namespace?: string | null,
>   key?: string | null,
>   name?: string | null,
>   type?: string | null,
>   settings?: {
>   } | null,
>   status?: string | null,
>   access?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### delete

`members.delete`

Delete a member. Cannot be undone. (DELETE /admin/members/\{id}/)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.ghost.api.members.delete({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Ghost accepted the call; it answered with no body. |

***

### get

`members.get`

Read a member by id. (GET /admin/members/\{id}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.members.get({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `members` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] members full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   email?: string | null,
>   name?: string | null,
>   note?: string | null,
>   geolocation?: string | null,
>   subscribed?: boolean | null,
>   status?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   labels?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     } | string
>   )[] | null,
>   subscriptions?: {
>   }[] | null,
>   avatar_image?: string | null,
>   email_count?: number | null,
>   email_opened_count?: number | null,
>   email_open_rate?: number | null,
>   last_seen_at?: string | null,
>   comped?: boolean | null,
>   unsubscribe_url?: string | null,
>   can_comment?: boolean | null,
>   commenting?: {
>   } | null,
>   email_suppression?: {
>   } | null,
>   newsletters?: (
>     {
>       id?: string | null,
>       uuid?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       sender_name?: string | null,
>       sender_email?: string | null,
>       sender_reply_to?: string | null,
>       status?: string | null,
>       visibility?: string | null,
>       subscribe_on_signup?: boolean | null,
>       sort_order?: number | null,
>       header_image?: string | null,
>       show_header_icon?: boolean | null,
>       show_header_title?: boolean | null,
>       title_font_category?: string | null,
>       title_alignment?: string | null,
>       show_feature_image?: boolean | null,
>       body_font_category?: string | null,
>       footer_content?: string | null,
>       show_badge?: boolean | null,
>       show_header_name?: boolean | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | {
>     }
>   )[] | null,
>   tiers?: {
>   }[] | null,
>   metafields?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### list

`members.list`

Browse members. Lists members, the 15 newest by default. Use filter (status:paid, label:vip, email:...) and search.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.members.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |
| `search` | `string` | No | Members whose name or email contains this text. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `members` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] members full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   email?: string | null,
>   name?: string | null,
>   note?: string | null,
>   geolocation?: string | null,
>   subscribed?: boolean | null,
>   status?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   labels?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     } | string
>   )[] | null,
>   subscriptions?: {
>   }[] | null,
>   avatar_image?: string | null,
>   email_count?: number | null,
>   email_opened_count?: number | null,
>   email_open_rate?: number | null,
>   last_seen_at?: string | null,
>   comped?: boolean | null,
>   unsubscribe_url?: string | null,
>   can_comment?: boolean | null,
>   commenting?: {
>   } | null,
>   email_suppression?: {
>   } | null,
>   newsletters?: (
>     {
>       id?: string | null,
>       uuid?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       sender_name?: string | null,
>       sender_email?: string | null,
>       sender_reply_to?: string | null,
>       status?: string | null,
>       visibility?: string | null,
>       subscribe_on_signup?: boolean | null,
>       sort_order?: number | null,
>       header_image?: string | null,
>       show_header_icon?: boolean | null,
>       show_header_title?: boolean | null,
>       title_font_category?: string | null,
>       title_alignment?: string | null,
>       show_feature_image?: boolean | null,
>       body_font_category?: string | null,
>       footer_content?: string | null,
>       show_badge?: boolean | null,
>       show_header_name?: boolean | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | {
>     }
>   )[] | null,
>   tiers?: {
>   }[] | null,
>   metafields?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### update

`members.update`

Edit a member. Send updated\_at as read: a stale value answers 409, so two edits never overwrite each other silently.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.members.update({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `email` | `string` | No | — |
| `name` | `string` | No | — |
| `note` | `string` | No | — |
| `subscribed` | `boolean` | No | — |
| `status` | `free \| paid \| comped \| gift` | No | — |
| `updated_at` | `string` | No | — |
| `labels` | `object[]` | No | — |
| `comped` | `boolean` | No | — |
| `commenting` | `object` | No | — |
| `newsletters` | `object[]` | No | — |
| `tiers` | `object[]` | No | — |
| `metafields` | `object` | No | — |

> [accordion] labels full type
>
> ```ts theme={null}
> (
>   {
>     id?: string,
>     name?: string,
>     slug?: string,
>     created_at?: string,
>     updated_at?: string
>   } | string
> )[]
> ```

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

> [accordion] newsletters full type
>
> ```ts theme={null}
> (
>   {
>     id?: string,
>     uuid?: string,
>     name?: string,
>     slug?: string,
>     description?: string,
>     sender_name?: string,
>     sender_email?: string,
>     sender_reply_to?: string,
>     status?: active | archived,
>     visibility?: string,
>     subscribe_on_signup?: boolean,
>     sort_order?: number,
>     header_image?: string,
>     show_header_icon?: boolean,
>     show_header_title?: boolean,
>     title_font_category?: string,
>     title_alignment?: string,
>     show_feature_image?: boolean,
>     body_font_category?: string,
>     footer_content?: string,
>     show_badge?: boolean,
>     show_header_name?: boolean,
>     created_at?: string,
>     updated_at?: string,
>     count?: {
>     }
>   } | {
>   }
> )[]
> ```

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

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `members` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] members full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   email?: string | null,
>   name?: string | null,
>   note?: string | null,
>   geolocation?: string | null,
>   subscribed?: boolean | null,
>   status?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   labels?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null
>     } | string
>   )[] | null,
>   subscriptions?: {
>   }[] | null,
>   avatar_image?: string | null,
>   email_count?: number | null,
>   email_opened_count?: number | null,
>   email_open_rate?: number | null,
>   last_seen_at?: string | null,
>   comped?: boolean | null,
>   unsubscribe_url?: string | null,
>   can_comment?: boolean | null,
>   commenting?: {
>   } | null,
>   email_suppression?: {
>   } | null,
>   newsletters?: (
>     {
>       id?: string | null,
>       uuid?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       sender_name?: string | null,
>       sender_email?: string | null,
>       sender_reply_to?: string | null,
>       status?: string | null,
>       visibility?: string | null,
>       subscribe_on_signup?: boolean | null,
>       sort_order?: number | null,
>       header_image?: string | null,
>       show_header_icon?: boolean | null,
>       show_header_title?: boolean | null,
>       title_font_category?: string | null,
>       title_alignment?: string | null,
>       show_feature_image?: boolean | null,
>       body_font_category?: string | null,
>       footer_content?: string | null,
>       show_badge?: boolean | null,
>       show_header_name?: boolean | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | {
>     }
>   )[] | null,
>   tiers?: {
>   }[] | null,
>   metafields?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

## Newsletters

### create

`newsletters.create`

Add a newsletter. (POST /admin/newsletters/)

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.newsletters.create({ name: 'casper' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `opt_in_existing` | `boolean` | No | true: subscribe every member who gets the default newsletter to this one too. |
| `name` | `string` | Yes | — |
| `slug` | `string` | No | — |
| `description` | `string` | No | — |
| `sender_name` | `string` | No | — |
| `sender_email` | `string` | No | — |
| `sender_reply_to` | `string` | No | — |
| `status` | `active \| archived` | No | — |
| `visibility` | `string` | No | — |
| `subscribe_on_signup` | `boolean` | No | — |
| `sort_order` | `number` | No | — |
| `header_image` | `string` | No | — |
| `show_header_icon` | `boolean` | No | — |
| `show_header_title` | `boolean` | No | — |
| `title_font_category` | `string` | No | — |
| `title_alignment` | `string` | No | — |
| `show_feature_image` | `boolean` | No | — |
| `body_font_category` | `string` | No | — |
| `footer_content` | `string` | No | — |
| `show_badge` | `boolean` | No | — |
| `show_header_name` | `boolean` | No | — |
| `updated_at` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `newsletters` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] newsletters full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   sender_name?: string | null,
>   sender_email?: string | null,
>   sender_reply_to?: string | null,
>   status?: string | null,
>   visibility?: string | null,
>   subscribe_on_signup?: boolean | null,
>   sort_order?: number | null,
>   header_image?: string | null,
>   show_header_icon?: boolean | null,
>   show_header_title?: boolean | null,
>   title_font_category?: string | null,
>   title_alignment?: string | null,
>   show_feature_image?: boolean | null,
>   body_font_category?: string | null,
>   footer_content?: string | null,
>   show_badge?: boolean | null,
>   show_header_name?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### get

`newsletters.get`

Read a newsletter by id. (GET /admin/newsletters/\{id}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.newsletters.get({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `newsletters` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] newsletters full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   sender_name?: string | null,
>   sender_email?: string | null,
>   sender_reply_to?: string | null,
>   status?: string | null,
>   visibility?: string | null,
>   subscribe_on_signup?: boolean | null,
>   sort_order?: number | null,
>   header_image?: string | null,
>   show_header_icon?: boolean | null,
>   show_header_title?: boolean | null,
>   title_font_category?: string | null,
>   title_alignment?: string | null,
>   show_feature_image?: boolean | null,
>   body_font_category?: string | null,
>   footer_content?: string | null,
>   show_badge?: boolean | null,
>   show_header_name?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### list

`newsletters.list`

Browse newsletters. Lists newsletters, 15 per page by default.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.newsletters.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `newsletters` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] newsletters full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   sender_name?: string | null,
>   sender_email?: string | null,
>   sender_reply_to?: string | null,
>   status?: string | null,
>   visibility?: string | null,
>   subscribe_on_signup?: boolean | null,
>   sort_order?: number | null,
>   header_image?: string | null,
>   show_header_icon?: boolean | null,
>   show_header_title?: boolean | null,
>   title_font_category?: string | null,
>   title_alignment?: string | null,
>   show_feature_image?: boolean | null,
>   body_font_category?: string | null,
>   footer_content?: string | null,
>   show_badge?: boolean | null,
>   show_header_name?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### update

`newsletters.update`

Edit a newsletter. Send updated\_at as read: a stale value answers 409, so two edits never overwrite each other silently.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.newsletters.update({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `slug` | `string` | No | — |
| `description` | `string` | No | — |
| `sender_name` | `string` | No | — |
| `sender_email` | `string` | No | — |
| `sender_reply_to` | `string` | No | — |
| `status` | `active \| archived` | No | — |
| `visibility` | `string` | No | — |
| `subscribe_on_signup` | `boolean` | No | — |
| `sort_order` | `number` | No | — |
| `header_image` | `string` | No | — |
| `show_header_icon` | `boolean` | No | — |
| `show_header_title` | `boolean` | No | — |
| `title_font_category` | `string` | No | — |
| `title_alignment` | `string` | No | — |
| `show_feature_image` | `boolean` | No | — |
| `body_font_category` | `string` | No | — |
| `footer_content` | `string` | No | — |
| `show_badge` | `boolean` | No | — |
| `show_header_name` | `boolean` | No | — |
| `updated_at` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `newsletters` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] newsletters full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   sender_name?: string | null,
>   sender_email?: string | null,
>   sender_reply_to?: string | null,
>   status?: string | null,
>   visibility?: string | null,
>   subscribe_on_signup?: boolean | null,
>   sort_order?: number | null,
>   header_image?: string | null,
>   show_header_icon?: boolean | null,
>   show_header_title?: boolean | null,
>   title_font_category?: string | null,
>   title_alignment?: string | null,
>   show_feature_image?: boolean | null,
>   body_font_category?: string | null,
>   footer_content?: string | null,
>   show_badge?: boolean | null,
>   show_header_name?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

## Offers

### create

`offers.create`

Add a offer. (POST /admin/offers/)

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.offers.create({
	name: 'Black Friday',
	code: 'black-friday',
	display_title: '20% off the first year',
	type: 'percent',
	cadence: 'year',
	amount: 20,
	duration: 'once',
	tier: { id: '6b0a3e9ebfdd6d00010042b2' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | No | — |
| `code` | `string` | No | — |
| `display_title` | `string` | No | — |
| `display_description` | `string` | No | — |
| `type` | `percent \| fixed \| trial \| free_months` | No | — |
| `cadence` | `month \| year` | No | — |
| `amount` | `number` | No | — |
| `duration` | `once \| forever \| repeating \| trial \| free_months` | No | — |
| `duration_in_months` | `number` | No | — |
| `currency_restriction` | `boolean` | No | — |
| `currency` | `string` | No | — |
| `status` | `active \| archived` | No | — |
| `tier` | `object` | No | — |
| `updated_at` | `string` | No | — |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `offers` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] offers full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   code?: string | null,
>   display_title?: string | null,
>   display_description?: string | null,
>   type?: string | null,
>   cadence?: string | null,
>   amount?: number | null,
>   duration?: string | null,
>   duration_in_months?: number | null,
>   currency_restriction?: boolean | null,
>   currency?: string | null,
>   status?: string | null,
>   redemption_count?: number | null,
>   tier?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### get

`offers.get`

Read a offer by id. (GET /admin/offers/\{id}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.offers.get({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `offers` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] offers full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   code?: string | null,
>   display_title?: string | null,
>   display_description?: string | null,
>   type?: string | null,
>   cadence?: string | null,
>   amount?: number | null,
>   duration?: string | null,
>   duration_in_months?: number | null,
>   currency_restriction?: boolean | null,
>   currency?: string | null,
>   status?: string | null,
>   redemption_count?: number | null,
>   tier?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### list

`offers.list`

Browse offers. Lists offers, 15 per page by default.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.offers.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `offers` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] offers full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   code?: string | null,
>   display_title?: string | null,
>   display_description?: string | null,
>   type?: string | null,
>   cadence?: string | null,
>   amount?: number | null,
>   duration?: string | null,
>   duration_in_months?: number | null,
>   currency_restriction?: boolean | null,
>   currency?: string | null,
>   status?: string | null,
>   redemption_count?: number | null,
>   tier?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### update

`offers.update`

Edit a offer. Send updated\_at as read: a stale value answers 409, so two edits never overwrite each other silently.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.offers.update({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `code` | `string` | No | — |
| `display_title` | `string` | No | — |
| `display_description` | `string` | No | — |
| `type` | `percent \| fixed \| trial \| free_months` | No | — |
| `cadence` | `month \| year` | No | — |
| `amount` | `number` | No | — |
| `duration` | `once \| forever \| repeating \| trial \| free_months` | No | — |
| `duration_in_months` | `number` | No | — |
| `currency_restriction` | `boolean` | No | — |
| `currency` | `string` | No | — |
| `status` | `active \| archived` | No | — |
| `tier` | `object` | No | — |
| `updated_at` | `string` | No | — |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `offers` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] offers full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   code?: string | null,
>   display_title?: string | null,
>   display_description?: string | null,
>   type?: string | null,
>   cadence?: string | null,
>   amount?: number | null,
>   duration?: string | null,
>   duration_in_months?: number | null,
>   currency_restriction?: boolean | null,
>   currency?: string | null,
>   status?: string | null,
>   redemption_count?: number | null,
>   tier?: {
>   } | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

## Pages

### copy

`pages.copy`

Copy a page. Makes a draft copy of the page.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.pages.copy({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pages` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] pages full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### create

`pages.create`

Add a page. (POST /admin/pages/)

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.pages.create({ title: 'example' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `source` | `html` | No | html: the body holds html, which Ghost converts to Lexical. |
| `title` | `string` | Yes | — |
| `slug` | `string` | No | — |
| `lexical` | `string` | No | — |
| `html` | `string` | No | — |
| `mobiledoc` | `string` | No | — |
| `feature_image` | `string` | No | — |
| `feature_image_alt` | `string` | No | — |
| `feature_image_caption` | `string` | No | — |
| `featured` | `boolean` | No | — |
| `status` | `draft \| published \| scheduled \| sent` | No | — |
| `visibility` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `published_at` | `string` | No | — |
| `custom_excerpt` | `string` | No | — |
| `codeinjection_head` | `string` | No | — |
| `codeinjection_foot` | `string` | No | — |
| `custom_template` | `string` | No | — |
| `canonical_url` | `string` | No | — |
| `tags` | `object[]` | No | — |
| `authors` | `object[]` | No | — |
| `tiers` | `object[]` | No | — |
| `og_image` | `string` | No | — |
| `og_title` | `string` | No | — |
| `og_description` | `string` | No | — |
| `twitter_image` | `string` | No | — |
| `twitter_title` | `string` | No | — |
| `twitter_description` | `string` | No | — |
| `meta_title` | `string` | No | — |
| `meta_description` | `string` | No | — |
| `email_subject` | `string` | No | — |
| `email_only` | `boolean` | No | — |
| `frontmatter` | `string` | No | — |

> [accordion] tags full type
>
> ```ts theme={null}
> (
>   {
>     id?: string,
>     name?: string,
>     slug?: string,
>     description?: string,
>     feature_image?: string,
>     visibility?: public | internal,
>     og_image?: string,
>     og_title?: string,
>     og_description?: string,
>     twitter_image?: string,
>     twitter_title?: string,
>     twitter_description?: string,
>     meta_title?: string,
>     meta_description?: string,
>     codeinjection_head?: string,
>     codeinjection_foot?: string,
>     canonical_url?: string,
>     accent_color?: string,
>     url?: string,
>     created_at?: string,
>     updated_at?: string,
>     count?: {
>     }
>   } | string
> )[]
> ```

> [accordion] authors full type
>
> ```ts theme={null}
> (
>   {
>     id?: string,
>     name?: string,
>     slug?: string,
>     email?: string,
>     profile_image?: string,
>     cover_image?: string,
>     bio?: string,
>     website?: string,
>     location?: string,
>     facebook?: string,
>     twitter?: string,
>     accessibility?: string,
>     status?: string,
>     meta_title?: string,
>     meta_description?: string,
>     tour?: string,
>     last_seen?: string,
>     created_at?: string,
>     updated_at?: string,
>     roles?: {
>     }[],
>     url?: string,
>     count?: {
>     }
>   } | string
> )[]
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pages` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] pages full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### delete

`pages.delete`

Delete a page. Cannot be undone. (DELETE /admin/pages/\{id}/)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.ghost.api.pages.delete({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Ghost accepted the call; it answered with no body. |

***

### get

`pages.get`

Read a page by id. (GET /admin/pages/\{id}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.pages.get({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `formats` | `string` | No | Content formats to return, comma-separated: lexical (default), html, mobiledoc, plaintext. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pages` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] pages full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### getBySlug

`pages.getBySlug`

Read a page by slug. (GET /admin/pages/slug/\{slug}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.pages.getBySlug({ slug: 'welcome' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `formats` | `string` | No | Content formats to return, comma-separated: lexical (default), html, mobiledoc, plaintext. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pages` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] pages full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### list

`pages.list`

Browse pages. Lists pages, 15 per page by default.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.pages.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |
| `formats` | `string` | No | Content formats to return, comma-separated: lexical (default), html, mobiledoc, plaintext. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pages` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] pages full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### update

`pages.update`

Edit a page. Send updated\_at as read: a stale value answers 409, so two edits never overwrite each other silently.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.pages.update({ id: '6b0a3e9ebfdd6d00010042b1', title: 'About us', updated_at: '2026-11-28T10:00:00.000Z' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `source` | `html` | No | html: the body holds html, which Ghost converts to Lexical. |
| `title` | `string` | No | — |
| `slug` | `string` | No | — |
| `lexical` | `string` | No | — |
| `html` | `string` | No | — |
| `mobiledoc` | `string` | No | — |
| `feature_image` | `string` | No | — |
| `feature_image_alt` | `string` | No | — |
| `feature_image_caption` | `string` | No | — |
| `featured` | `boolean` | No | — |
| `status` | `draft \| published \| scheduled \| sent` | No | — |
| `visibility` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `published_at` | `string` | No | — |
| `custom_excerpt` | `string` | No | — |
| `codeinjection_head` | `string` | No | — |
| `codeinjection_foot` | `string` | No | — |
| `custom_template` | `string` | No | — |
| `canonical_url` | `string` | No | — |
| `tags` | `object[]` | No | — |
| `authors` | `object[]` | No | — |
| `tiers` | `object[]` | No | — |
| `og_image` | `string` | No | — |
| `og_title` | `string` | No | — |
| `og_description` | `string` | No | — |
| `twitter_image` | `string` | No | — |
| `twitter_title` | `string` | No | — |
| `twitter_description` | `string` | No | — |
| `meta_title` | `string` | No | — |
| `meta_description` | `string` | No | — |
| `email_subject` | `string` | No | — |
| `email_only` | `boolean` | No | — |
| `frontmatter` | `string` | No | — |

> [accordion] tags full type
>
> ```ts theme={null}
> (
>   {
>     id?: string,
>     name?: string,
>     slug?: string,
>     description?: string,
>     feature_image?: string,
>     visibility?: public | internal,
>     og_image?: string,
>     og_title?: string,
>     og_description?: string,
>     twitter_image?: string,
>     twitter_title?: string,
>     twitter_description?: string,
>     meta_title?: string,
>     meta_description?: string,
>     codeinjection_head?: string,
>     codeinjection_foot?: string,
>     canonical_url?: string,
>     accent_color?: string,
>     url?: string,
>     created_at?: string,
>     updated_at?: string,
>     count?: {
>     }
>   } | string
> )[]
> ```

> [accordion] authors full type
>
> ```ts theme={null}
> (
>   {
>     id?: string,
>     name?: string,
>     slug?: string,
>     email?: string,
>     profile_image?: string,
>     cover_image?: string,
>     bio?: string,
>     website?: string,
>     location?: string,
>     facebook?: string,
>     twitter?: string,
>     accessibility?: string,
>     status?: string,
>     meta_title?: string,
>     meta_description?: string,
>     tour?: string,
>     last_seen?: string,
>     created_at?: string,
>     updated_at?: string,
>     roles?: {
>     }[],
>     url?: string,
>     count?: {
>     }
>   } | string
> )[]
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `pages` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] pages full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

## Posts

### copy

`posts.copy`

Copy a post. Makes a draft copy of the post.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.posts.copy({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `posts` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] posts full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### create

`posts.create`

Add a post. Creating with status published puts the post on the live site; pass source=html to send html instead of lexical.

**Risk:** `destructive`

```ts theme={null}
await corsair.ghost.api.posts.create({
	title: 'Release notes',
	html: '<p>What changed this week.</p>',
	source: 'html',
	status: 'draft',
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `source` | `html` | No | html: the body holds html, which Ghost converts to Lexical. |
| `title` | `string` | Yes | — |
| `slug` | `string` | No | — |
| `lexical` | `string` | No | — |
| `html` | `string` | No | — |
| `mobiledoc` | `string` | No | — |
| `feature_image` | `string` | No | — |
| `feature_image_alt` | `string` | No | — |
| `feature_image_caption` | `string` | No | — |
| `featured` | `boolean` | No | — |
| `status` | `draft \| published \| scheduled \| sent` | No | — |
| `visibility` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `published_at` | `string` | No | — |
| `custom_excerpt` | `string` | No | — |
| `codeinjection_head` | `string` | No | — |
| `codeinjection_foot` | `string` | No | — |
| `custom_template` | `string` | No | — |
| `canonical_url` | `string` | No | — |
| `tags` | `object[]` | No | — |
| `authors` | `object[]` | No | — |
| `tiers` | `object[]` | No | — |
| `og_image` | `string` | No | — |
| `og_title` | `string` | No | — |
| `og_description` | `string` | No | — |
| `twitter_image` | `string` | No | — |
| `twitter_title` | `string` | No | — |
| `twitter_description` | `string` | No | — |
| `meta_title` | `string` | No | — |
| `meta_description` | `string` | No | — |
| `email_subject` | `string` | No | — |
| `email_only` | `boolean` | No | — |
| `frontmatter` | `string` | No | — |

> [accordion] tags full type
>
> ```ts theme={null}
> (
>   {
>     id?: string,
>     name?: string,
>     slug?: string,
>     description?: string,
>     feature_image?: string,
>     visibility?: public | internal,
>     og_image?: string,
>     og_title?: string,
>     og_description?: string,
>     twitter_image?: string,
>     twitter_title?: string,
>     twitter_description?: string,
>     meta_title?: string,
>     meta_description?: string,
>     codeinjection_head?: string,
>     codeinjection_foot?: string,
>     canonical_url?: string,
>     accent_color?: string,
>     url?: string,
>     created_at?: string,
>     updated_at?: string,
>     count?: {
>     }
>   } | string
> )[]
> ```

> [accordion] authors full type
>
> ```ts theme={null}
> (
>   {
>     id?: string,
>     name?: string,
>     slug?: string,
>     email?: string,
>     profile_image?: string,
>     cover_image?: string,
>     bio?: string,
>     website?: string,
>     location?: string,
>     facebook?: string,
>     twitter?: string,
>     accessibility?: string,
>     status?: string,
>     meta_title?: string,
>     meta_description?: string,
>     tour?: string,
>     last_seen?: string,
>     created_at?: string,
>     updated_at?: string,
>     roles?: {
>     }[],
>     url?: string,
>     count?: {
>     }
>   } | string
> )[]
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `posts` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] posts full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### delete

`posts.delete`

Delete a post. Cannot be undone. (DELETE /admin/posts/\{id}/)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.ghost.api.posts.delete({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Ghost accepted the call; it answered with no body. |

***

### get

`posts.get`

Read a post by id. (GET /admin/posts/\{id}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.posts.get({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `formats` | `string` | No | Content formats to return, comma-separated: lexical (default), html, mobiledoc, plaintext. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `posts` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] posts full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### getBySlug

`posts.getBySlug`

Read a post by slug. (GET /admin/posts/slug/\{slug}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.posts.getBySlug({ slug: 'welcome' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `formats` | `string` | No | Content formats to return, comma-separated: lexical (default), html, mobiledoc, plaintext. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `posts` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] posts full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### list

`posts.list`

Browse posts. Lists posts, 15 per page by default.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.posts.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |
| `formats` | `string` | No | Content formats to return, comma-separated: lexical (default), html, mobiledoc, plaintext. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `posts` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] posts full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### update

`posts.update`

Edit a post. Send updated\_at as read: a stale value answers 409. Publishing with newsletter set emails the post to members. Send updated\_at as last read (a stale value answers 409). Setting status published with the newsletter query value emails the post to members, which cannot be undone.

**Risk:** `destructive`

```ts theme={null}
await corsair.ghost.api.posts.update({ id: '6b0a3e9ebfdd6d00010042b1', title: 'Release notes (updated)', updated_at: '2026-11-28T10:00:00.000Z' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `source` | `html` | No | html: the body holds html, which Ghost converts to Lexical. |
| `newsletter` | `string` | No | Slug of the newsletter to email the post to when this edit publishes it. |
| `email_segment` | `string` | No | Which members get the email: all (default), status:free, status:-free, or an NQL filter. |
| `title` | `string` | No | — |
| `slug` | `string` | No | — |
| `lexical` | `string` | No | — |
| `html` | `string` | No | — |
| `mobiledoc` | `string` | No | — |
| `feature_image` | `string` | No | — |
| `feature_image_alt` | `string` | No | — |
| `feature_image_caption` | `string` | No | — |
| `featured` | `boolean` | No | — |
| `status` | `draft \| published \| scheduled \| sent` | No | — |
| `visibility` | `string` | No | — |
| `updated_at` | `string` | No | — |
| `published_at` | `string` | No | — |
| `custom_excerpt` | `string` | No | — |
| `codeinjection_head` | `string` | No | — |
| `codeinjection_foot` | `string` | No | — |
| `custom_template` | `string` | No | — |
| `canonical_url` | `string` | No | — |
| `tags` | `object[]` | No | — |
| `authors` | `object[]` | No | — |
| `tiers` | `object[]` | No | — |
| `og_image` | `string` | No | — |
| `og_title` | `string` | No | — |
| `og_description` | `string` | No | — |
| `twitter_image` | `string` | No | — |
| `twitter_title` | `string` | No | — |
| `twitter_description` | `string` | No | — |
| `meta_title` | `string` | No | — |
| `meta_description` | `string` | No | — |
| `email_subject` | `string` | No | — |
| `email_only` | `boolean` | No | — |
| `frontmatter` | `string` | No | — |

> [accordion] tags full type
>
> ```ts theme={null}
> (
>   {
>     id?: string,
>     name?: string,
>     slug?: string,
>     description?: string,
>     feature_image?: string,
>     visibility?: public | internal,
>     og_image?: string,
>     og_title?: string,
>     og_description?: string,
>     twitter_image?: string,
>     twitter_title?: string,
>     twitter_description?: string,
>     meta_title?: string,
>     meta_description?: string,
>     codeinjection_head?: string,
>     codeinjection_foot?: string,
>     canonical_url?: string,
>     accent_color?: string,
>     url?: string,
>     created_at?: string,
>     updated_at?: string,
>     count?: {
>     }
>   } | string
> )[]
> ```

> [accordion] authors full type
>
> ```ts theme={null}
> (
>   {
>     id?: string,
>     name?: string,
>     slug?: string,
>     email?: string,
>     profile_image?: string,
>     cover_image?: string,
>     bio?: string,
>     website?: string,
>     location?: string,
>     facebook?: string,
>     twitter?: string,
>     accessibility?: string,
>     status?: string,
>     meta_title?: string,
>     meta_description?: string,
>     tour?: string,
>     last_seen?: string,
>     created_at?: string,
>     updated_at?: string,
>     roles?: {
>     }[],
>     url?: string,
>     count?: {
>     }
>   } | string
> )[]
> ```

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `posts` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] posts full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   uuid?: string | null,
>   title?: string | null,
>   slug?: string | null,
>   lexical?: string | null,
>   html?: string | null,
>   mobiledoc?: string | null,
>   comment_id?: string | null,
>   feature_image?: string | null,
>   feature_image_alt?: string | null,
>   feature_image_caption?: string | null,
>   featured?: boolean | null,
>   status?: string | null,
>   visibility?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   published_at?: string | null,
>   custom_excerpt?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   custom_template?: string | null,
>   canonical_url?: string | null,
>   tags?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       description?: string | null,
>       feature_image?: string | null,
>       visibility?: string | null,
>       og_image?: string | null,
>       og_title?: string | null,
>       og_description?: string | null,
>       twitter_image?: string | null,
>       twitter_title?: string | null,
>       twitter_description?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       codeinjection_head?: string | null,
>       codeinjection_foot?: string | null,
>       canonical_url?: string | null,
>       accent_color?: string | null,
>       url?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   authors?: (
>     {
>       id?: string | null,
>       name?: string | null,
>       slug?: string | null,
>       email?: string | null,
>       profile_image?: string | null,
>       cover_image?: string | null,
>       bio?: string | null,
>       website?: string | null,
>       location?: string | null,
>       facebook?: string | null,
>       twitter?: string | null,
>       accessibility?: string | null,
>       status?: string | null,
>       meta_title?: string | null,
>       meta_description?: string | null,
>       tour?: string | null,
>       last_seen?: string | null,
>       created_at?: string | null,
>       updated_at?: string | null,
>       roles?: {
>       }[] | null,
>       url?: string | null,
>       count?: {
>       } | null
>     } | string
>   )[] | null,
>   primary_author?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     email?: string | null,
>     profile_image?: string | null,
>     cover_image?: string | null,
>     bio?: string | null,
>     website?: string | null,
>     location?: string | null,
>     facebook?: string | null,
>     twitter?: string | null,
>     accessibility?: string | null,
>     status?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     tour?: string | null,
>     last_seen?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     roles?: {
>     }[] | null,
>     url?: string | null,
>     count?: {
>     } | null
>   } | null,
>   primary_tag?: {
>     id?: string | null,
>     name?: string | null,
>     slug?: string | null,
>     description?: string | null,
>     feature_image?: string | null,
>     visibility?: string | null,
>     og_image?: string | null,
>     og_title?: string | null,
>     og_description?: string | null,
>     twitter_image?: string | null,
>     twitter_title?: string | null,
>     twitter_description?: string | null,
>     meta_title?: string | null,
>     meta_description?: string | null,
>     codeinjection_head?: string | null,
>     codeinjection_foot?: string | null,
>     canonical_url?: string | null,
>     accent_color?: string | null,
>     url?: string | null,
>     created_at?: string | null,
>     updated_at?: string | null,
>     count?: {
>     } | null
>   } | null,
>   tiers?: {
>   }[] | null,
>   url?: string | null,
>   excerpt?: string | null,
>   reading_time?: number | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   email_subject?: string | null,
>   email_only?: boolean | null,
>   newsletter?: {
>   } | null,
>   email?: {
>   } | null,
>   email_segment?: string | null,
>   frontmatter?: string | null,
>   plaintext?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

## Roles

### list

`roles.list`

Browse staff roles. Use permissions=assign to list only the roles this key may give.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.roles.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `permissions` | `assign` | No | assign: only roles the caller may assign. |
| `limit` | `number \| all` | No | Records per page. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `roles` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   description?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

## Site

### get

`site.get`

Read site details. The site title, description, logo, icon, accent colour, URL and Ghost version. No authentication needed. Works without authentication.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.site.get({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `site` | `object \| null` | No | — |

> [accordion] site full type
>
> ```ts theme={null}
> {
>   title?: string | null,
>   description?: string | null,
>   logo?: string | null,
>   icon?: string | null,
>   accent_color?: string | null,
>   locale?: string | null,
>   url?: string | null,
>   version?: string | null
> } | null
> ```

***

## Tags

### create

`tags.create`

Add a tag. (POST /admin/tags/)

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.tags.create({ name: 'casper' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `slug` | `string` | No | — |
| `description` | `string` | No | — |
| `feature_image` | `string` | No | — |
| `visibility` | `public \| internal` | No | — |
| `og_image` | `string` | No | — |
| `og_title` | `string` | No | — |
| `og_description` | `string` | No | — |
| `twitter_image` | `string` | No | — |
| `twitter_title` | `string` | No | — |
| `twitter_description` | `string` | No | — |
| `meta_title` | `string` | No | — |
| `meta_description` | `string` | No | — |
| `codeinjection_head` | `string` | No | — |
| `codeinjection_foot` | `string` | No | — |
| `canonical_url` | `string` | No | — |
| `accent_color` | `string` | No | — |
| `updated_at` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   feature_image?: string | null,
>   visibility?: string | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   canonical_url?: string | null,
>   accent_color?: string | null,
>   url?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### delete

`tags.delete`

Delete a tag. Cannot be undone. (DELETE /admin/tags/\{id}/)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.ghost.api.tags.delete({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Ghost accepted the call; it answered with no body. |

***

### get

`tags.get`

Read a tag by id. (GET /admin/tags/\{id}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.tags.get({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   feature_image?: string | null,
>   visibility?: string | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   canonical_url?: string | null,
>   accent_color?: string | null,
>   url?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### getBySlug

`tags.getBySlug`

Read a tag by slug. (GET /admin/tags/slug/\{slug}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.tags.getBySlug({ slug: 'welcome' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   feature_image?: string | null,
>   visibility?: string | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   canonical_url?: string | null,
>   accent_color?: string | null,
>   url?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### list

`tags.list`

Browse tags. Lists tags, 15 per page by default.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.tags.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   feature_image?: string | null,
>   visibility?: string | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   canonical_url?: string | null,
>   accent_color?: string | null,
>   url?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### update

`tags.update`

Edit a tag. Send updated\_at as read: a stale value answers 409, so two edits never overwrite each other silently.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.tags.update({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `slug` | `string` | No | — |
| `description` | `string` | No | — |
| `feature_image` | `string` | No | — |
| `visibility` | `public \| internal` | No | — |
| `og_image` | `string` | No | — |
| `og_title` | `string` | No | — |
| `og_description` | `string` | No | — |
| `twitter_image` | `string` | No | — |
| `twitter_title` | `string` | No | — |
| `twitter_description` | `string` | No | — |
| `meta_title` | `string` | No | — |
| `meta_description` | `string` | No | — |
| `codeinjection_head` | `string` | No | — |
| `codeinjection_foot` | `string` | No | — |
| `canonical_url` | `string` | No | — |
| `accent_color` | `string` | No | — |
| `updated_at` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tags` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] tags full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   feature_image?: string | null,
>   visibility?: string | null,
>   og_image?: string | null,
>   og_title?: string | null,
>   og_description?: string | null,
>   twitter_image?: string | null,
>   twitter_title?: string | null,
>   twitter_description?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   codeinjection_head?: string | null,
>   codeinjection_foot?: string | null,
>   canonical_url?: string | null,
>   accent_color?: string | null,
>   url?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   count?: {
>   } | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

## Themes

### activate

`themes.activate`

Activate a theme. Switches the live site to this theme. Switches the live site to this theme.

**Risk:** `destructive`

```ts theme={null}
await corsair.ghost.api.themes.activate({ name: 'casper' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `themes` | `object[] \| null` | No | — |

> [accordion] themes full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   package?: {
>   } | null,
>   active?: boolean | null,
>   templates?: {
>   }[] | null,
>   warnings?: {
>   }[] | null,
>   errors?: {
>   }[] | null
> }[] | null
> ```

***

### upload

`themes.upload`

Upload a theme. A theme ZIP. A theme with the same name is replaced.

**Risk:** `destructive`

```ts theme={null}
await corsair.ghost.api.themes.upload({
	file: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.txt', contentType: 'text/plain' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `file` | `string \| object \| custom` | Yes | The file. |

> [accordion] file full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `themes` | `object[] \| null` | No | — |

> [accordion] themes full type
>
> ```ts theme={null}
> {
>   name?: string | null,
>   package?: {
>   } | null,
>   active?: boolean | null,
>   templates?: {
>   }[] | null,
>   warnings?: {
>   }[] | null,
>   errors?: {
>   }[] | null
> }[] | null
> ```

***

## Tiers

### create

`tiers.create`

Add a tier. (POST /admin/tiers/)

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.tiers.create({ name: 'casper' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `name` | `string` | Yes | — |
| `slug` | `string` | No | — |
| `description` | `string` | No | — |
| `active` | `boolean` | No | — |
| `type` | `free \| paid` | No | — |
| `welcome_page_url` | `string` | No | — |
| `visibility` | `string` | No | — |
| `monthly_price` | `number` | No | — |
| `yearly_price` | `number` | No | — |
| `currency` | `string` | No | — |
| `trial_days` | `number` | No | — |
| `benefits` | `string[]` | No | — |
| `updated_at` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tiers` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] tiers full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   active?: boolean | null,
>   type?: string | null,
>   welcome_page_url?: string | null,
>   visibility?: string | null,
>   monthly_price?: number | null,
>   yearly_price?: number | null,
>   currency?: string | null,
>   trial_days?: number | null,
>   benefits?: string[] | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### get

`tiers.get`

Read a tier by id. (GET /admin/tiers/\{id}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.tiers.get({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tiers` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] tiers full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   active?: boolean | null,
>   type?: string | null,
>   welcome_page_url?: string | null,
>   visibility?: string | null,
>   monthly_price?: number | null,
>   yearly_price?: number | null,
>   currency?: string | null,
>   trial_days?: number | null,
>   benefits?: string[] | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### list

`tiers.list`

Browse tiers. Lists tiers, 15 per page by default.

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.tiers.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tiers` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] tiers full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   active?: boolean | null,
>   type?: string | null,
>   welcome_page_url?: string | null,
>   visibility?: string | null,
>   monthly_price?: number | null,
>   yearly_price?: number | null,
>   currency?: string | null,
>   trial_days?: number | null,
>   benefits?: string[] | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### update

`tiers.update`

Edit a tier. Send updated\_at as read: a stale value answers 409, so two edits never overwrite each other silently.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.tiers.update({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `slug` | `string` | No | — |
| `description` | `string` | No | — |
| `active` | `boolean` | No | — |
| `type` | `free \| paid` | No | — |
| `welcome_page_url` | `string` | No | — |
| `visibility` | `string` | No | — |
| `monthly_price` | `number` | No | — |
| `yearly_price` | `number` | No | — |
| `currency` | `string` | No | — |
| `trial_days` | `number` | No | — |
| `benefits` | `string[]` | No | — |
| `updated_at` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tiers` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] tiers full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   description?: string | null,
>   active?: boolean | null,
>   type?: string | null,
>   welcome_page_url?: string | null,
>   visibility?: string | null,
>   monthly_price?: number | null,
>   yearly_price?: number | null,
>   currency?: string | null,
>   trial_days?: number | null,
>   benefits?: string[] | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

## Users

### delete

`users.delete`

Delete a staff user. Their posts move to the owner. Needs a staff access token of an Administrator (an integration key answers 403). Needs a staff access token of an Administrator: an integration key answers 403. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.ghost.api.users.delete({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Ghost accepted the call; it answered with no body. |

***

### get

`users.get`

Read a staff user by id. (GET /admin/users/\{id}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.users.get({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   email?: string | null,
>   profile_image?: string | null,
>   cover_image?: string | null,
>   bio?: string | null,
>   website?: string | null,
>   location?: string | null,
>   facebook?: string | null,
>   twitter?: string | null,
>   accessibility?: string | null,
>   status?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   tour?: string | null,
>   last_seen?: string | null,
>   comment_notifications?: boolean | null,
>   free_member_signup_notification?: boolean | null,
>   paid_subscription_started_notification?: boolean | null,
>   paid_subscription_canceled_notification?: boolean | null,
>   mention_notifications?: boolean | null,
>   milestone_notifications?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   roles?: {
>   }[] | null,
>   count?: {
>   } | null,
>   url?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### getByEmail

`users.getByEmail`

Read a staff user by email. (GET /admin/users/email/\{email}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.users.getByEmail({ email: 'ada@example.com' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `email` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   email?: string | null,
>   profile_image?: string | null,
>   cover_image?: string | null,
>   bio?: string | null,
>   website?: string | null,
>   location?: string | null,
>   facebook?: string | null,
>   twitter?: string | null,
>   accessibility?: string | null,
>   status?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   tour?: string | null,
>   last_seen?: string | null,
>   comment_notifications?: boolean | null,
>   free_member_signup_notification?: boolean | null,
>   paid_subscription_started_notification?: boolean | null,
>   paid_subscription_canceled_notification?: boolean | null,
>   mention_notifications?: boolean | null,
>   milestone_notifications?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   roles?: {
>   }[] | null,
>   count?: {
>   } | null,
>   url?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### getBySlug

`users.getBySlug`

Read a staff user by slug. (GET /admin/users/slug/\{slug}/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.users.getBySlug({ slug: 'welcome' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `slug` | `string` | Yes | — |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   email?: string | null,
>   profile_image?: string | null,
>   cover_image?: string | null,
>   bio?: string | null,
>   website?: string | null,
>   location?: string | null,
>   facebook?: string | null,
>   twitter?: string | null,
>   accessibility?: string | null,
>   status?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   tour?: string | null,
>   last_seen?: string | null,
>   comment_notifications?: boolean | null,
>   free_member_signup_notification?: boolean | null,
>   paid_subscription_started_notification?: boolean | null,
>   paid_subscription_canceled_notification?: boolean | null,
>   mention_notifications?: boolean | null,
>   milestone_notifications?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   roles?: {
>   }[] | null,
>   count?: {
>   } | null,
>   url?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### list

`users.list`

Browse staff users. (GET /admin/users/)

**Risk:** `read`

```ts theme={null}
await corsair.ghost.api.users.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `include` | `string` | No | Related data to include, comma-separated (for example tags,authors). |
| `fields` | `string` | No | Only these fields, comma-separated. |
| `filter` | `string` | No | An NQL filter, for example tag:getting-started+featured:true. |
| `limit` | `number \| all` | No | Records per page (15 by default), or all. |
| `page` | `number` | No | Which page of results. |
| `order` | `string` | No | Sort order, for example published\_at DESC. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   email?: string | null,
>   profile_image?: string | null,
>   cover_image?: string | null,
>   bio?: string | null,
>   website?: string | null,
>   location?: string | null,
>   facebook?: string | null,
>   twitter?: string | null,
>   accessibility?: string | null,
>   status?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   tour?: string | null,
>   last_seen?: string | null,
>   comment_notifications?: boolean | null,
>   free_member_signup_notification?: boolean | null,
>   paid_subscription_started_notification?: boolean | null,
>   paid_subscription_canceled_notification?: boolean | null,
>   mention_notifications?: boolean | null,
>   milestone_notifications?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   roles?: {
>   }[] | null,
>   count?: {
>   } | null,
>   url?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### update

`users.update`

Edit a staff user. Needs a staff access token or a user session (an integration key answers 403). Needs a staff access token (an Administrator's): an integration key answers 403.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.users.update({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `name` | `string` | No | — |
| `slug` | `string` | No | — |
| `email` | `string` | No | — |
| `profile_image` | `string` | No | — |
| `cover_image` | `string` | No | — |
| `bio` | `string` | No | — |
| `website` | `string` | No | — |
| `location` | `string` | No | — |
| `facebook` | `string` | No | — |
| `twitter` | `string` | No | — |
| `accessibility` | `string` | No | — |
| `status` | `string` | No | — |
| `meta_title` | `string` | No | — |
| `meta_description` | `string` | No | — |
| `tour` | `string` | No | — |
| `comment_notifications` | `boolean` | No | — |
| `free_member_signup_notification` | `boolean` | No | — |
| `paid_subscription_started_notification` | `boolean` | No | — |
| `paid_subscription_canceled_notification` | `boolean` | No | — |
| `mention_notifications` | `boolean` | No | — |
| `milestone_notifications` | `boolean` | No | — |
| `updated_at` | `string` | No | — |
| `roles` | `object[]` | No | — |

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `users` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] users full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   name?: string | null,
>   slug?: string | null,
>   email?: string | null,
>   profile_image?: string | null,
>   cover_image?: string | null,
>   bio?: string | null,
>   website?: string | null,
>   location?: string | null,
>   facebook?: string | null,
>   twitter?: string | null,
>   accessibility?: string | null,
>   status?: string | null,
>   meta_title?: string | null,
>   meta_description?: string | null,
>   tour?: string | null,
>   last_seen?: string | null,
>   comment_notifications?: boolean | null,
>   free_member_signup_notification?: boolean | null,
>   paid_subscription_started_notification?: boolean | null,
>   paid_subscription_canceled_notification?: boolean | null,
>   mention_notifications?: boolean | null,
>   milestone_notifications?: boolean | null,
>   created_at?: string | null,
>   updated_at?: string | null,
>   roles?: {
>   }[] | null,
>   count?: {
>   } | null,
>   url?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

## Webhooks

### create

`webhooks.create`

Add a webhook. Ghost POSTs the event to target\_url, signed with the secret.

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.webhooks.create({ event: 'post.published', target_url: 'https://example.com/hooks/ghost' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `event` | `string` | Yes | — |
| `target_url` | `string` | Yes | — |
| `name` | `string` | No | — |
| `secret` | `string` | No | — |
| `api_version` | `string` | No | — |
| `integration_id` | `string` | No | — |
| `status` | `string` | No | — |
| `last_triggered_at` | `string` | No | — |
| `last_triggered_status` | `string` | No | — |
| `last_triggered_error` | `string` | No | — |
| `updated_at` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `webhooks` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] webhooks full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   event?: string | null,
>   target_url?: string | null,
>   name?: string | null,
>   secret?: string | null,
>   api_version?: string | null,
>   integration_id?: string | null,
>   status?: string | null,
>   last_triggered_at?: string | null,
>   last_triggered_status?: string | null,
>   last_triggered_error?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***

### delete

`webhooks.delete`

Delete a webhook. Cannot be undone. (DELETE /admin/webhooks/\{id}/)

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.ghost.api.webhooks.delete({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

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

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `success` | `true` | Yes | Ghost accepted the call; it answered with no body. |

***

### update

`webhooks.update`

Edit a webhook. (PUT /admin/webhooks/\{id}/)

**Risk:** `write`

```ts theme={null}
await corsair.ghost.api.webhooks.update({ id: '6b0a3e9ebfdd6d00010042b1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `string` | Yes | — |
| `event` | `string` | No | — |
| `target_url` | `string` | No | — |
| `name` | `string` | No | — |
| `secret` | `string` | No | — |
| `api_version` | `string` | No | — |
| `integration_id` | `string` | No | — |
| `status` | `string` | No | — |
| `last_triggered_at` | `string` | No | — |
| `last_triggered_status` | `string` | No | — |
| `last_triggered_error` | `string` | No | — |
| `updated_at` | `string` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `webhooks` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] webhooks full type
>
> ```ts theme={null}
> {
>   id?: string | null,
>   event?: string | null,
>   target_url?: string | null,
>   name?: string | null,
>   secret?: string | null,
>   api_version?: string | null,
>   integration_id?: string | null,
>   status?: string | null,
>   last_triggered_at?: string | null,
>   last_triggered_status?: string | null,
>   last_triggered_error?: string | null,
>   created_at?: string | null,
>   updated_at?: string | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   pagination?: {
>     page?: number | null,
>     limit?: number | string | null,
>     pages?: number | null,
>     total?: number | null,
>     next?: number | null,
>     prev?: number | null
>   } | null
> } | null
> ```

***


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