> ## Documentation Index
> Fetch the complete documentation index at: https://nango-wari-add-support-for-sagemember.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get a function

> Returns a single deployed function. Requires an API key with the `environment:functions:read` scope.

<Info>
  Requires an API key with the `environment:functions:read` scope. [Learn more about API key scopes](/reference/backend/http-api/api-keys#scopes).
</Info>

Returns a single deployed function.


## OpenAPI

````yaml GET /integrations/{uniqueKey}/functions/{name}
openapi: 3.1.0
info:
  title: Nango API
  description: Nango API specs used to authorize & sync data with external APIs.
  version: 1.0.0
servers:
  - url: https://api.nango.dev
    description: Production server
  - url: http://localhost:3003
    description: Local server
security:
  - bearerAuth: []
externalDocs:
  url: https://nango.dev/docs/reference/backend/http-api/authentication
paths:
  /integrations/{uniqueKey}/functions/{name}:
    get:
      summary: Get a function
      description: >-
        Returns a single deployed function. Requires an API key with the
        `environment:functions:read` scope.
      parameters:
        - name: uniqueKey
          in: path
          required: true
          schema:
            type: string
          description: The integration ID (unique_key) that you created in Nango.
        - name: name
          in: path
          required: true
          schema:
            type: string
          description: The name of the function.
        - name: type
          in: query
          required: false
          schema:
            type: string
            enum:
              - sync
              - action
              - on-event
          description: Disambiguates when multiple functions share the same name.
      responses:
        '200':
          description: Successfully returned the function
          content:
            application/json:
              schema:
                type: object
                required:
                  - data
                properties:
                  data:
                    $ref: '#/components/schemas/DeployedNangoFunction'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
components:
  schemas:
    DeployedNangoFunction:
      description: >-
        A deployed function (sync, action, or on-event) merged with its
        deployment metadata.
      oneOf:
        - allOf:
            - $ref: '#/components/schemas/NangoSyncFunction'
            - $ref: '#/components/schemas/DeployedMeta'
        - allOf:
            - $ref: '#/components/schemas/NangoActionFunction'
            - $ref: '#/components/schemas/DeployedMeta'
        - allOf:
            - $ref: '#/components/schemas/NangoOnEventFunction'
            - $ref: '#/components/schemas/DeployedMeta'
    NangoSyncFunction:
      type: object
      required:
        - name
        - type
        - returns
        - json_schema
        - runs
        - auto_start
        - track_deletes
      properties:
        name:
          type: string
        description:
          type: string
        scopes:
          type: array
          items:
            type: string
        type:
          type: string
          enum:
            - sync
        input:
          type: string
        returns:
          type: array
          items:
            type: string
        json_schema:
          type:
            - object
            - 'null'
        runs:
          type:
            - string
            - 'null'
          description: Schedule expression, e.g. `every day`.
        auto_start:
          type: boolean
        track_deletes:
          type: boolean
    DeployedMeta:
      type: object
      description: Deployment metadata attached to a deployed function.
      required:
        - id
        - enabled
        - last_deployed
        - source
      properties:
        id:
          type: number
        enabled:
          type: boolean
        last_deployed:
          type: string
          format: date-time
          description: ISO-8601 timestamp.
        source:
          type: string
          enum:
            - catalog
            - standalone
            - repo
    NangoActionFunction:
      type: object
      required:
        - name
        - type
        - returns
        - json_schema
      properties:
        name:
          type: string
        description:
          type: string
        scopes:
          type: array
          items:
            type: string
        type:
          type: string
          enum:
            - action
        input:
          type: string
        returns:
          type: array
          items:
            type: string
        json_schema:
          type:
            - object
            - 'null'
    NangoOnEventFunction:
      type: object
      required:
        - name
        - type
        - event
      properties:
        name:
          type: string
        description:
          type: string
        scopes:
          type: array
          items:
            type: string
        type:
          type: string
          enum:
            - on-event
        event:
          type: string
          enum:
            - post-connection-creation
            - pre-connection-deletion
            - validate-connection
    StdError:
      type: object
      additionalProperties: false
      properties:
        error:
          type: object
          additionalProperties: false
          required:
            - code
          properties:
            code:
              type: string
            message:
              type: string
            errors:
              type: array
              items:
                type: object
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StdError'
    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StdError'
    Forbidden:
      description: Forbidden
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StdError'
    NotFound:
      description: Not Found
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/StdError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: The secret key from your Nango environment.

````