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

# List notification templates scoped to a journey

> List notification templates scoped to this journey. Journey-scoped notification templates can only be referenced from `send` nodes within the same journey.



## OpenAPI

````yaml /openapi-specs/openapi.documented.yml get /journeys/{templateId}/templates
openapi: 3.0.1
info:
  title: Courier
  description: The Courier REST API for sending and managing notifications across channels.
  version: 0.0.1
servers:
  - url: https://api.courier.com
    description: Production
security: []
paths:
  /journeys/{templateId}/templates:
    get:
      tags:
        - Journeys
      summary: List notification templates scoped to a journey
      description: >-
        List notification templates scoped to this journey. Journey-scoped
        notification templates can only be referenced from `send` nodes within
        the same journey.
      operationId: journeys_listTemplates
      parameters:
        - in: path
          name: templateId
          schema:
            type: string
            minLength: 1
          required: true
          description: Journey id
        - in: query
          name: cursor
          description: Pagination cursor from a prior response.
          schema:
            type: string
        - in: query
          name: limit
          description: Page size. Minimum 1, maximum 100.
          schema:
            type: integer
            minimum: 1
            maximum: 100
      responses:
        '200':
          description: Notification template list
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JourneyTemplateListResponse'
              examples:
                Example1:
                  summary: Two notification templates
                  value:
                    results:
                      - id: tmpl-1
                        name: Welcome email
                        tags: []
                        state: PUBLISHED
                        created: 1715000000000
                        creator: user-1
                      - id: tmpl-2
                        name: Welcome push
                        tags: []
                        state: PUBLISHED
                        created: 1715000100000
                        creator: user-1
                    paging:
                      more: false
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequest'
              examples:
                Example:
                  value:
                    message: Example message text
                    type: invalid_request_error
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFound'
              examples:
                Example:
                  value:
                    message: Example message text
                    type: invalid_request_error
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Courier from '@trycourier/courier';


            const client = new Courier({
              apiKey: process.env['COURIER_API_KEY'], // This is the default and can be omitted
            });


            const journeyTemplateListResponse = await
            client.journeys.templates.list('x');


            console.log(journeyTemplateListResponse.paging);
        - lang: Python
          source: |-
            import os
            from courier import Courier

            client = Courier(
                api_key=os.environ.get("COURIER_API_KEY"),  # This is the default and can be omitted
            )
            journey_template_list_response = client.journeys.templates.list(
                template_id="x",
            )
            print(journey_template_list_response.paging)
        - lang: Go
          source: "package main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/trycourier/courier-go\"\n\t\"github.com/trycourier/courier-go/option\"\n)\n\nfunc main() {\n\tclient := courier.NewClient(\n\t\toption.WithAPIKey(\"My API Key\"),\n\t)\n\tjourneyTemplateListResponse, err := client.Journeys.Templates.List(\n\t\tcontext.TODO(),\n\t\t\"x\",\n\t\tcourier.JourneyTemplateListParams{},\n\t)\n\tif err != nil {\n\t\tpanic(err.Error())\n\t}\n\tfmt.Printf(\"%+v\\n\", journeyTemplateListResponse.Paging)\n}\n"
        - lang: Java
          source: |-
            package com.courier.example;

            import com.courier.client.CourierClient;
            import com.courier.client.okhttp.CourierOkHttpClient;
            import com.courier.models.journeys.JourneyTemplateListResponse;
            import com.courier.models.journeys.templates.TemplateListParams;

            public final class Main {
                private Main() {}

                public static void main(String[] args) {
                    CourierClient client = CourierOkHttpClient.fromEnv();

                    JourneyTemplateListResponse journeyTemplateListResponse = client.journeys().templates().list("x");
                }
            }
        - lang: Ruby
          source: >-
            require "courier"


            courier = Courier::Client.new(api_key: "My API Key")


            journey_template_list_response =
            courier.journeys.templates.list("x")


            puts(journey_template_list_response)
        - lang: PHP
          source: >-
            <?php


            require_once dirname(__DIR__) . '/vendor/autoload.php';


            use Courier\Client;

            use Courier\Core\Exceptions\APIException;


            $client = new Client(apiKey: getenv('COURIER_API_KEY') ?: 'My API
            Key');


            try {
              $journeyTemplateListResponse = $client->journeys->templates->list(
                'x', cursor: 'cursor', limit: 1
              );

              var_dump($journeyTemplateListResponse);
            } catch (APIException $e) {
              echo $e->getMessage();
            }
        - lang: C#
          source: >-
            using System;

            using TryCourier;

            using TryCourier.Models.Journeys.Templates;


            CourierClient client = new();


            TemplateListParams parameters = new() { TemplateID = "x" };


            var journeyTemplateListResponse = await
            client.Journeys.Templates.List(parameters);


            Console.WriteLine(journeyTemplateListResponse);
        - lang: CLI
          source: |-
            courier journeys:templates list \
              --api-key 'My API Key' \
              --template-id x
components:
  schemas:
    JourneyTemplateListResponse:
      description: Paged list of journey-scoped notification templates.
      type: object
      properties:
        results:
          type: array
          items:
            $ref: '#/components/schemas/JourneyTemplateSummary'
        paging:
          $ref: '#/components/schemas/Paging'
      required:
        - results
        - paging
    BadRequest:
      title: BadRequest
      type: object
      properties:
        type:
          type: string
          enum:
            - invalid_request_error
      required:
        - type
      allOf:
        - $ref: '#/components/schemas/BaseError'
    NotFound:
      title: NotFound
      type: object
      properties:
        type:
          type: string
          enum:
            - invalid_request_error
      required:
        - type
      allOf:
        - $ref: '#/components/schemas/BaseError'
    JourneyTemplateSummary:
      description: >-
        Summary fields of a journey-scoped notification template returned in
        list responses.
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        tags:
          type: array
          items:
            type: string
        state:
          type: string
        created:
          type: integer
          format: int64
        creator:
          type: string
        updated:
          type: integer
          format: int64
        updater:
          type: string
      required:
        - id
        - name
        - tags
        - state
        - created
        - creator
    Paging:
      title: Paging
      type: object
      properties:
        cursor:
          type: string
          nullable: true
        more:
          type: boolean
      required:
        - more
    BaseError:
      title: BaseError
      type: object
      properties:
        message:
          type: string
          description: A message describing the error that occurred.
      required:
        - message
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````