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

# Get a snippet

> Fetches a single snippet by `id`. Unlike [List snippets](/api-reference/snippets/list-snippets), this endpoint **always returns the full `content` and `document`** — no `include_content` flag needed.

Use this when you have an `id` (e.g. stored from a prior create call) and need the current `key` and body — for example, to preview the resolved HTML or confirm a snippet still exists before referencing it as `{{ snippet.key }}` in a broadcast or sequence email. See [Create a snippet](/api-reference/snippets/create-a-snippet) for the snippet model.



## OpenAPI

````yaml /api-reference/v4.json get /v4/snippets/{id}
openapi: 3.0.3
info:
  title: Kit API
  version: '4.0'
servers:
  - url: https://api.kit.com
security: []
paths:
  /v4/snippets/{id}:
    get:
      tags:
        - Snippets
      summary: Get a snippet
      description: >-
        Fetches a single snippet by `id`. Unlike [List
        snippets](/api-reference/snippets/list-snippets), this endpoint **always
        returns the full `content` and `document`** — no `include_content` flag
        needed.


        Use this when you have an `id` (e.g. stored from a prior create call)
        and need the current `key` and body — for example, to preview the
        resolved HTML or confirm a snippet still exists before referencing it as
        `{{ snippet.key }}` in a broadcast or sequence email. See [Create a
        snippet](/api-reference/snippets/create-a-snippet) for the snippet
        model.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: integer
          example: 25
      responses:
        '200':
          description: Returns the snippet details
          content:
            application/json:
              schema:
                type: object
                properties:
                  snippet:
                    type: object
                    properties:
                      id:
                        type: integer
                      name:
                        type: string
                      snippet_type:
                        type: string
                      archived:
                        type: boolean
                      key:
                        type: string
                      created_at:
                        type: string
                      updated_at:
                        type: string
                      content:
                        type: string
                      document:
                        type: object
                        properties:
                          id:
                            type: integer
                          value:
                            nullable: true
                          value_html:
                            type: string
                          value_plain:
                            nullable: true
                          version:
                            type: integer
                        required:
                          - id
                          - value
                          - value_html
                          - value_plain
                          - version
                    required:
                      - id
                      - name
                      - snippet_type
                      - archived
                      - key
                      - created_at
                      - updated_at
                      - content
                      - document
                required:
                  - snippet
              example:
                snippet:
                  id: 24
                  name: Welcome message
                  snippet_type: inline
                  archived: false
                  key: welcome-message
                  created_at: '2023-02-17T11:43:55Z'
                  updated_at: '2023-02-17T11:43:55Z'
                  content: Hello {{ subscriber.first_name }}
                  document:
                    id: 112
                    value: null
                    value_html: content
                    value_plain: null
                    version: 1
        '401':
          description: Returns a 401 if the token and/or account cannot be authenticated
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                required:
                  - errors
              example:
                errors:
                  - The access token is invalid
        '404':
          description: Returns a 404 when the provided id does not exist
          content:
            application/json:
              schema:
                type: object
                properties:
                  errors:
                    type: array
                    items:
                      type: string
                required:
                  - errors
              example:
                errors:
                  - Not Found
      security:
        - API Key: []
        - OAuth2: []
components:
  securitySchemes:
    API Key:
      description: Authenticate API requests via an API Key
      type: apiKey
      in: header
      name: X-Kit-Api-Key
    OAuth2:
      description: Authenticate API requests via an OAuth token
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://api.kit.com/v4/oauth/authorize
          tokenUrl: https://api.kit.com/v4/oauth/token
          refreshUrl: https://api.kit.com/v4/oauth/token
          scopes:
            read: Read access to Kit API v4
            write: Write access to Kit API v4

````