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

# Get App Instance

> Get a specific app instance by ID.

## Authentication and permissions

> **Token requirements:** **User-based token (OAuth)** or **Organization-scoped API key** or **Workspace-scoped API key**.
>
> Send a bearer access token for one of these identities. The permissions and resource restrictions below also apply.

| Credential | Access requirements |
| - | - |
| Organization-scoped API key | `apps:read` |
| Workspace-scoped API key | `apps:read` |
| User-based token (OAuth) | Supported, subject to permissions |

Permissions joined by **+** are all required; **or** separates alternatives. Full-access keys still cannot call endpoints marked unsupported. Workspace keys must allow every workspace checked by the request. OAuth access depends on the user’s roles and resource access.


## OpenAPI

````yaml /sections/api-reference/openapi-spec-v2.yaml get /v2/app-instances/{id}
openapi: 3.1.0
info:
  title: Serval Public API
  description: Serval Public API
  contact:
    name: Serval
    url: https://serval.com
    email: support@serval.com
  license:
    name: Serval License
    url: https://serval.com/license
  version: 2.0.0
servers:
  - url: https://public.api.serval.com
security:
  - BearerAuth: []
tags:
  - name: Access Membership API
  - name: Access Policy API
  - name: Access Policy Approval Procedure API
  - name: Access Profile API
  - name: Access Relationship API
  - name: Access Request API
  - name: Agent API
  - name: Alerts API
  - name: Analytics API
  - name: App Instance API
  - name: App Resource API
  - name: App Resource Role API
  - name: Approval Delegation API
  - name: Approval Procedure API
  - name: Approval Request API
  - name: Assignment Rules API
  - name: Audit Log API
  - name: Billing API
  - name: Browser API
  - name: Campaign API
  - name: Change Blackout API
  - name: Change Model API
  - name: Connected Channels API
  - name: Custom Field API
  - name: Custom Role API
  - name: Custom Service API
  - name: Dashboards API
  - name: Email Intake API
  - name: Entity API
  - name: Entity Field Mapping API
  - name: Entity Ingestion Config API
  - name: Entity Type API
  - name: Folder API
  - name: Forms API
  - name: Group API
  - name: Guidance API
  - name: Help Agent API
  - name: Improvement Request API
  - name: Journey API
  - name: Knowledge API
  - name: Knowledge Base API
  - name: One-Time Window API
  - name: Package API
  - name: Platform Migration API
  - name: Project API
  - name: Report API
  - name: Review API
  - name: Role Sync API
  - name: Roles API
  - name: SLA API
  - name: Schedule API
  - name: Skills API
  - name: Tag API
  - name: Ticket API
  - name: Ticket Import API
  - name: Ticket Type API
  - name: Topic API
  - name: User API
  - name: User Relationship API
  - name: Widgets API
  - name: Worker API
  - name: Workflow API
  - name: Workflow Approval Procedure API
  - name: Workflow Run API
  - name: Workspace API
  - name: Workspace Group API
  - name: Workspace SDLC Settings API
  - name: Workspace User API
paths:
  /v2/app-instances/{id}:
    get:
      tags:
        - App Instance API
      summary: Get App Instance
      description: Get a specific app instance by ID.
      operationId: svrelay.publicv2.PublicAPIServiceV2.GetAppInstance
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            title: id
            description: The ID of the app instance.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/svflow.publicapi.GetAppInstanceResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    svflow.publicapi.GetAppInstanceResponse:
      type: object
      properties:
        data:
          $ref: '#/components/schemas/svflow.pubapimodels.AppInstance'
          title: data
          description: The app instance.
          x-stainless-terraform-configurability: optional
      title: GetAppInstanceResponse
      additionalProperties: false
    svflow.pubapimodels.AppInstance:
      type: object
      allOf:
        - properties:
            id:
              type: string
              title: id
              description: The ID of the app instance.
              readOnly: true
              x-stainless-terraform-configurability: computed
            teamId:
              type: string
              title: team_id
              description: >-
                The ID of the Serval workspace that owns the app instance. For
                instances
                 returned by ListAppInstances because they are shared with the requesting
                 workspace, this is the owning workspace's ID and will differ from the request
                 team_id.
              x-stainless-terraform-configurability: optional
            externalServiceInstanceId:
              type: string
              title: external_service_instance_id
              description: >-
                The external service instance ID (e.g., GitHub org name, Okta
                domain, AWS account ID).
              x-stainless-terraform-configurability: optional
            name:
              type: string
              title: name
              description: The name of the app instance.
              x-stainless-terraform-configurability: optional
            accessRequestsEnabled:
              type: boolean
              title: access_requests_enabled
              description: Whether access requests are enabled for the app instance.
              x-stainless-terraform-configurability: computed_optional
            defaultAccessPolicyId:
              type:
                - string
                - 'null'
              title: default_access_policy_id
              description: The default access policy for the app instance.
              x-stainless-terraform-configurability: optional
            customServiceName:
              type: string
              title: custom_service_name
              description: >-
                The display name of the custom service (only set when
                service_type is custom_service_id).
              x-stainless-terraform-configurability: optional
            tagIds:
              type: array
              items:
                type: string
              title: tag_ids
              description: IDs of the tags currently attached to this app instance.
              x-stainless-terraform-configurability: optional
            integrationIds:
              type: array
              items:
                type: string
              title: integration_ids
              description: IDs of the integrations configured for this app instance.
              x-stainless-terraform-configurability: optional
            a2aAgentCard:
              $ref: '#/components/schemas/svflow.common.models.A2AAgentCard'
              title: a2a_agent_card
              description: >-
                The A2A agent card captured by the last discovery sync. Set only
                for
                 custom apps connected as A2A agents whose card has been discovered —
                 it describes the external agent's identity and advertised skills.
              x-stainless-terraform-configurability: optional
            routeDirectFromWorker:
              type: boolean
              title: route_direct_from_worker
              description: >-
                When true, workflows that use this app run on the self-hosted
                (hybrid)
                 worker of the workspace running the workflow, and the app's requests egress
                 from that worker inside the customer's network instead of Serval's
                 cloud proxy. Set for apps that are only reachable on a private network.
              readOnly: true
              x-stainless-terraform-configurability: computed
            owners:
              $ref: '#/components/schemas/svflow.pubapimodels.AppInstanceOwners'
              title: owners
              x-stainless-terraform-configurability: optional
        - oneOf:
            - type: object
              properties:
                customServiceId:
                  type: string
                  title: custom_service_id
                  description: The ID of the custom service (for custom apps).
                  x-stainless-terraform-configurability: optional
              title: custom_service_id
              required:
                - customServiceId
            - type: object
              properties:
                service:
                  type: string
                  title: service
                  description: >-
                    The service identifier (for built-in services like "github",
                    "okta", "aws").
                  x-stainless-terraform-configurability: optional
              title: service
              required:
                - service
      title: AppInstance
      additionalProperties: false
    svflow.common.models.A2AAgentCard:
      type: object
      properties:
        name:
          type: string
          title: name
          x-stainless-terraform-configurability: optional
        description:
          type: string
          title: description
          x-stainless-terraform-configurability: optional
        url:
          type: string
          title: url
          description: >-
            The agent's preferred A2A JSON-RPC endpoint, from the card's `url`
            field.
          x-stainless-terraform-configurability: optional
        version:
          type: string
          title: version
          x-stainless-terraform-configurability: optional
        skills:
          type: array
          items:
            $ref: '#/components/schemas/svflow.common.models.A2AAgentSkill'
          title: skills
          x-stainless-terraform-configurability: optional
        workflowId:
          type:
            - string
            - 'null'
          title: workflow_id
          description: >-
            The generated send-message workflow that routes requests to this
            agent.
          x-stainless-terraform-configurability: optional
        lastSyncedAt:
          oneOf:
            - $ref: '#/components/schemas/google.protobuf.Timestamp'
            - type: 'null'
          title: last_synced_at
          x-stainless-terraform-configurability: optional
        securitySchemes:
          type: array
          items:
            $ref: '#/components/schemas/svflow.common.models.A2AAgentSecurityScheme'
          title: security_schemes
          description: >-
            How the agent says it must be authenticated. Empty both for agents
            that
             declare nothing and for cards synced before this was captured — a
             re-sync repopulates it, same as every other card field.
          x-stainless-terraform-configurability: optional
      title: A2AAgentCard
      additionalProperties: false
      description: >-
        A2AAgentCard is the agent card captured by the last A2A discovery sync
        for an
         app instance: the external agent's self-description plus the Serval-side
         context (generated send-message workflow, sync time).
    svflow.pubapimodels.AppInstanceOwners:
      type: object
      properties:
        userIds:
          type: array
          items:
            type: string
          title: user_ids
          description: IDs of users in the app instance's organization.
          x-stainless-terraform-configurability: optional
        groupIds:
          type: array
          items:
            type: string
          title: group_ids
          description: IDs of groups available to the app instance's workspace.
          x-stainless-terraform-configurability: optional
      title: AppInstanceOwners
      additionalProperties: false
      description: Owners are replaced as a set; an empty object clears all owners.
    svflow.common.models.A2AAgentSkill:
      type: object
      properties:
        id:
          type: string
          title: id
          x-stainless-terraform-configurability: optional
        name:
          type: string
          title: name
          x-stainless-terraform-configurability: optional
        description:
          type: string
          title: description
          x-stainless-terraform-configurability: optional
        tags:
          type: array
          items:
            type: string
          title: tags
          x-stainless-terraform-configurability: optional
        examples:
          type: array
          items:
            type: string
          title: examples
          x-stainless-terraform-configurability: optional
        inputModes:
          type: array
          items:
            type: string
          title: input_modes
          description: Media types the skill accepts/returns (e.g. "text/plain").
          x-stainless-terraform-configurability: optional
        outputModes:
          type: array
          items:
            type: string
          title: output_modes
          x-stainless-terraform-configurability: optional
      title: A2AAgentSkill
      additionalProperties: false
    google.protobuf.Timestamp:
      type: string
      examples:
        - '2025-01-15T01:30:15.000Z'
        - '2025-06-01T00:00:00.000Z'
      format: date-time
      description: A timestamp in RFC 3339 format (e.g., "2025-01-15T01:30:15Z").
    svflow.common.models.A2AAgentSecurityScheme:
      type: object
      properties:
        name:
          type: string
          title: name
          description: The card's own key for this scheme. Unique within a card.
          x-stainless-terraform-configurability: optional
        kind:
          $ref: '#/components/schemas/svflow.common.models.A2AAgentSecuritySchemeKind'
          title: kind
          x-stainless-terraform-configurability: optional
        openIdConnectUrl:
          type: string
          title: open_id_connect_url
          description: 'Set only for OPEN_ID_CONNECT: the OIDC discovery document URL.'
          x-stainless-terraform-configurability: optional
        flow:
          type: string
          title: flow
          description: >-
            Set only for OAUTH2, and only when the scheme published exactly one
            flow
             (all v1.0 can express; the norm in v0.3). One of authorizationCode,
             clientCredentials, deviceCode, implicit, password. A free-form string
             rather than an enum because the value is the agent's, not Serval's, and
             a newer spec may add flows — same reasoning as AgentInterface's
             protocolBinding.
          x-stainless-terraform-configurability: optional
        oauth2MetadataUrl:
          type: string
          title: oauth2_metadata_url
          description: 'Set only for OAUTH2: RFC 8414 authorization-server metadata URL.'
          x-stainless-terraform-configurability: optional
        scopes:
          type: array
          items:
            type: string
          title: scopes
          description: >-
            Scope names the scheme advertises. NEITHER A2A version carries an
            RFC
             8707 resource field, so a required audience can appear only here, inside
             a scope string (e.g. "api://<app-id>/.default"). That makes these strings
             the only machine-readable statement of which API the agent's tokens must
             be addressed to.
          x-stainless-terraform-configurability: optional
      title: A2AAgentSecurityScheme
      additionalProperties: false
      description: >-
        A2AAgentSecurityScheme is one authentication scheme an agent card
        declares,
         normalized from the two mutually invalid wire encodings (A2A v0.3's flat
         `type`-discriminated object, v1.0's one-key oneof envelope) by the extraction
         workflow. Third-party input: bounded at capture, and never trusted as
         authorization — it describes what the agent ASKS for, which is what makes it
         worth comparing against the provider an operator actually bound.
    svflow.common.models.A2AAgentSecuritySchemeKind:
      type: string
      title: A2AAgentSecuritySchemeKind
      enum:
        - A2A_AGENT_SECURITY_SCHEME_KIND_UNSPECIFIED
        - A2A_AGENT_SECURITY_SCHEME_KIND_OPEN_ID_CONNECT
        - A2A_AGENT_SECURITY_SCHEME_KIND_OAUTH2
        - A2A_AGENT_SECURITY_SCHEME_KIND_API_KEY
        - A2A_AGENT_SECURITY_SCHEME_KIND_HTTP
        - A2A_AGENT_SECURITY_SCHEME_KIND_MUTUAL_TLS
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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