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

# Replace App Collaborators

> Replaces the app's collaborators: the companies, besides the owner, that may see and install it. A pending app may
only name companies (`none` or `inclusion`); once Narrative has activated it, the owner may also share it with
`all` companies or by `exclusion`. Narrowing the collaborators doesn't remove existing installations.




## OpenAPI

````yaml https://docs-cdn.narrative.io/api-reference/main/openapi.json put /v2/apps/{slug}/collaborators
openapi: 3.1.1
info:
  contact:
    email: support@narrative.io
    name: Narrative Support
    url: https://www.narrative.io
  termsOfService: https://www.narrative.io/legal/terms-of-service
  x-logo:
    url: >-
      https://cdn.narrative.io/images/company-logos/prod/narrative-logo-text-white.svg
    backgroundColor: rgb(9, 34, 166)
    altText: Narrative Logo
  description: >-
    The [Narrative Data Collaboration Platform](https://app.narrative.io) API is
    organized around REST. Our API has predictable resource-oriented URLs,
    accepts form-encoded request bodies, returns JSON-encoded responses, and
    uses standard HTTP response codes, authentication, and verbs.



    The current version is a pre-release beta.  It may result in unexpected
    behavior and there may be breaking changes in future releases up to the 1.0
    release.
  title: Narrative Data Collaboration Platform API
  version: 2.4.x
servers:
  - url: https://api-dev.narrative.io
  - url: https://api.narrative.io
security: []
tags:
  - name: Access Rules
    description: >-
      Access rules let data providers control who can purchase their data and
      the terms of purchase.


      The `access-rules` API allows you to manage access rules for your
      datasets.


      Related guides:
        - [What is an access rule?](https://kb.narrative.io/access-rules)
  - name: Agent Conversations
    description: >-
      Build LLM-driven workflows that can call MCP tools, ask the caller for
      input, and return structured answers.


      A conversation pins a model, a system prompt, and a tool catalog. Each run
      sends the model a user message (or

      a batch of tool outputs from a previously-paused run); the model decides
      whether to answer directly, call a

      server-side tool (resolved by the platform via Model Context Protocol), or
      call a client-side tool (which pauses

      the run with `requires_action` and waits for the caller to reply).


      Related guides:
        - [Agent Conversations Reference](https://docs.narrative.io/reference/architecture/agent-conversations)
        - [Error catalog](https://docs.narrative.io/reference/architecture/agent-conversations/errors/conversation-not-found)
  - name: MCP Connections
    description: >-
      Connect external (non-Narrative) MCP servers so agent runs can call their
      tools with the

      calling user's own OAuth authorization.


      A connection is created interactively: `POST /mcp-connections` runs OAuth
      discovery and

      Dynamic Client Registration against the server and returns a consent URL;
      the user authorizes

      in a browser; the authorization server redirects to `GET
      /mcp-connections/callback`, which

      stores the authorization code and sends the browser on to the Narrative
      app; the app calls

      `POST /mcp-connections/complete` with the user's own bearer token, which
      exchanges the code and

      marks the connection `connected`.


      That last step is authenticated on purpose. The callback is public — it's
      a cross-site browser

      redirect, so no bearer reaches it — so it is not allowed to complete
      anything. Only the user

      who started the flow can turn the stored code into a token.


      Tokens are stored encrypted and used server-side — they are never returned
      by the API. Once

      connected, reference the connection by id from an agent run's
      `mcp_servers[].connection_id`.
  - name: App Invites
    description: >-
      App invites allow applications to create one-time, shareable links on
      behalf of their users. These links

      enable users to invite third parties who do not have a Narrative account
      to perform actions within the

      application.


      For example, a Narrative user can send an invite link to a third party who
      then completes a Pinterest

      OAuth flow and creates a connector profile in the inviter's account,
      allowing the inviter to deliver

      audience data to the third party's Pinterest account without the third
      party needing a Narrative account.


      This API is intended to be used by applications (via app client
      credentials) to create and manage invites

      on behalf of their users, which can then be shared with invitees.
  - name: Apps
    description: >-
      Apps are applications bundled with a UI that can perform various actions
      on behalf of a user utilizing the Narrative API.

      Related guides:
        - [Building a Narrative Native App](https://www.narrative.io/knowledge-base/how-to-guides/building-a-narrative-native-app)
  - name: Access Tokens
    description: >-
      System Access Tokens are long-lived bearer credentials for calling the API
      without a user present.


      A token belongs to a company, carries an explicit list of permissions, and
      expires on a date you choose — at

      least a day out and at most a year. `admin` access cannot be granted to
      one.


      `POST /access-tokens/tokens` is the only endpoint that returns the
      credential. Everything after that works in

      terms of the token's id: the list, get and update responses describe a
      token without ever repeating its

      `access_token`. If you lose it, delete the token and create another.


      Related guides:
        - [How to Create an API Token](https://www.narrative.io/knowledge-base/how-to-guides/understanding-narratives-apis/create-an-api-token)
  - name: Attributes
    description: >-
      An attribute models a standardized data point available for sale on the
      Narrative marketplace.


      Narrative automatically turns data points from provider datasets into
      attributes so that buyers can purchase well-formed, standardized data from
      any supplier on the marketplace.
  - name: Auth
    description: >-
      API token is a crucial step for developers to securely authenticate
      requests to the Narrative API

      Related guides:
        - [How to Create an API Token](https://www.narrative.io/knowledge-base/how-to-guides/understanding-narratives-apis/create-an-api-token)
  - name: Authentication
    description: User login and registration
  - name: Billings
    description: Used by Narrative internally to bill customers
  - name: Companies
    description: A collection of employees
  - name: Company Marketing Information
    description: Useful information related to companies
  - name: Compute Pools
    description: >-
      Compute pools represent compute resources (e.g. Snowflake warehouses)
      provisioned within a data plane.

      Companies can manage and share compute pools, assign them to jobs, and set
      a default compute pool on data planes.
  - name: Connections
    description: Associations between connectors and datasets
  - name: Datasets
    description: >-
      Any kind of data, in any schema, can be pushed into the Narrative Data
      Collaboration Platform as a dataset exactly as it is stored in your own
      system.


      The `datasets` API allows you to manage your datasets.
  - name: Derivations
    description: >-
      Derivation rules describe how the value of one Rosetta Stone attribute can
      be computed from another — for

      example, hashing a raw email into a SHA-256 hashed email. Each rule
      carries a transformation expression that

      reads the source attribute's value through `$source`.


      The `derivations` API allows you to browse the rules your company can use
      — the ones it owns plus the ones

      shared with it through collaborators. Creating and changing them requires
      an `admin` grant on

      `attribute_derivations`, and a rule can only be changed by the company
      that owns it.
  - name: Installations
    description: Installations of Applications for a profile
  - name: Jobs
    description: >-
      Jobs represent an operation done on a given data plane. All jobs today are
      tied to a query that represents a forecast or a materialized view.


      The jobs API provides an interface for interacting with the jobs table,
      which stores various operations involving reading or writing data. This
      API allows users to retrieve detailed information about specific jobs,
      including NQL forecasts and materialized views.
  - name: Mappings
    description: >-
      A mapping is a transformation from a dataset to an attribute. Defining a
      mapping between a dataset and an attribute makes the dataset eligible to
      participate in subscriptions where a buyer is purchasing the target
      attribute.
  - name: Model Inference
    description: Model Inference
  - name: Model Training
    description: >-
      Train machine learning models on datasets, e.g. text classifiers used to
      power attribute mappings.
  - name: Models
    description: >-
      Machine learning models for training and inference.


      Models can be stored in HuggingFace or Narrative repositories and have
      configurable

      collaborator permissions for training and inference access.


      The `models` API allows you to list, retrieve, and update models
      accessible to your company.
  - name: NQL
    description: >-
      Narrative Query Language (NQL) is a specialized, SQL-inspired language
      designed to query and manipulate data within the Narrative platform. While
      it looks and feels much like standard SQL, it offers extended
      functionality and syntax that let you leverage platform-specific
      features—such as referencing datasets by their IDs, creating materialized
      views, or generating forecasts—without having to manage the complexities
      of different query engines behind the scenes. NQL queries can ultimately
      compile down to multiple underlying engines (e.g., Snowflake, Spark) to
      execute your requests efficiently in the Narrative ecosystem.


      Datasets, views, and access rules share one NQL naming namespace per
      company. Use

      `GET /nql/name-availability?name=monthly_purchases` to check whether a
      name is free before creating an object.

      Archiving a dataset, view, or access rule releases its name. Availability
      is a check, not a reservation.
  - name: Profiles
    description: >-
      App profiles are associated with an installation. They represent a
      reference to a configuration that the app can use to save confidential
      information outside of Narrative's control.

      Profiles are currently used to configure settings for connector apps.
  - name: Resources
    description: >-
      Narrative gives you access to managed resources, like your own AWS S3
      bucket, so that you can effortlessly buy and sell data on the platform.


      The `resources` API allows you to manage your resources.
  - name: Schema Inference
    description: >-
      The `schema-inference` API analyzes submitted files to automatically infer
      and return their structure as a dataset schema.
  - name: Uploads
    description: >-
      The `uploads` API allows you to send files to Narrative and use them to
      perform tasks like creating a list or adding data to a dataset.
  - name: Usage
    description: >-
      The `usage` API enables the recording of usage events associated with a
      product.
  - name: Webhooks
    description: >-
      Webhooks push events to a URL you control instead of making you poll for
      them.


      You create a subscription with the endpoint you want events sent to and a
      filter describing which events you

      want. Two kinds of subscription exist: job subscriptions follow the
      lifecycle of Narrative jobs, and app

      subscriptions follow the events a Narrative app reports through `POST
      /apps/events`.


      Creating a subscription returns a `secret`. Narrative sends it back in the
      `X-Narrative-Secret` header on

      every delivery, and comparing the two is how you tell a real callback from
      a forged one — so store it and do

      not share it.


      Deliveries are described under the "Event delivery" webhook below. Return
      any 2xx; anything else is retried

      with exponential backoff, and because a retry reuses the envelope's `id`,
      handlers should be idempotent

      on it.
  - name: Workflows
    description: >-
      The `workflows` API allows you to create, schedule, trigger, and archive
      workflows.

      Workflows are defined using a serverlessworkflow YAML specification.
paths:
  /v2/apps/{slug}/collaborators:
    put:
      tags:
        - Apps
      summary: Replace App Collaborators
      description: >
        Replaces the app's collaborators: the companies, besides the owner, that
        may see and install it. A pending app may

        only name companies (`none` or `inclusion`); once Narrative has
        activated it, the owner may also share it with

        `all` companies or by `exclusion`. Narrowing the collaborators doesn't
        remove existing installations.
      operationId: ReplaceAppCollaborators
      parameters:
        - name: slug
          in: path
          description: >-
            1-63 lowercase letters, digits or hyphens, not starting or ending
            with a hyphen, so it works as a URL path segment and as a subdomain.
            Permanent.
          schema:
            type: string
            description: >-
              1-63 lowercase letters, digits or hyphens, not starting or ending
              with a hyphen, so it works as a URL path segment and as a
              subdomain. Permanent.
            pattern: ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$
            example: my-connector
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AppCollaborators'
        required: true
      responses:
        '200':
          description: ReplaceAppCollaborators 200 response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OwnedAppResponse'
        '400':
          description: BadRequestError 400 response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '401':
          description: UnauthorizedError 401 response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedError'
        '403':
          description: 403 Response
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/CollaboratorsNotPermittedError'
                  - $ref: '#/components/schemas/ForbiddenError'
                  - $ref: '#/components/schemas/UserTokenRequiredError'
        '404':
          description: AppNotFoundError 404 response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppNotFoundError'
        '500':
          description: InternalError 500 response
      security:
        - BearerAuth: []
components:
  schemas:
    AppCollaborators:
      type: object
      description: >-
        The companies, besides the owner, that may see and install the app while
        it is pending or active. `install` must be a subset of `view`. Only an
        active app may use `all` or `exclusion`.
      properties:
        view:
          $ref: '#/components/schemas/AppCollaboratorsParticipants'
          description: The companies that may see the app.
        install:
          $ref: '#/components/schemas/AppCollaboratorsParticipants'
          description: >-
            The companies that may install the app. Each must also be admitted
            by `view`.
      required:
        - view
        - install
      example:
        view:
          type: inclusion
          company_ids:
            - 1234
        install:
          type: inclusion
          company_ids:
            - 1234
      $defs:
        AppCollaboratorsParticipants:
          type: object
          description: >-
            A set of companies. `all` (every company) and `none` take no
            `company_ids`; `inclusion` (only these) and `exclusion` (every
            company but these) need at least one.
          properties:
            type:
              type: string
              enum:
                - all
                - none
                - inclusion
                - exclusion
            company_ids:
              type: array
              minItems: 1
              items:
                type: integer
                format: int64
                minimum: 0
          required:
            - type
          oneOf:
            - properties:
                type:
                  enum:
                    - all
                    - none
              not:
                required:
                  - company_ids
            - properties:
                type:
                  enum:
                    - inclusion
                    - exclusion
              required:
                - company_ids
    OwnedAppResponse:
      description: >-
        The owner's view, tagged `type: owned` like the `AppResponse` it is one
        case of.
      allOf:
        - $ref: '#/components/schemas/OwnedApp'
        - type: object
          properties:
            type:
              type: string
              enum:
                - owned
          required:
            - type
    BadRequestError:
      type: object
      description: >-
        API-wide errors, declared at service level because any operation can
        return them: the auth middleware

        (UnauthorizedError, ForbiddenError), request decoding (BadRequestError)
        and unexpected failures (InternalError).

        Errors an operation produces itself are declared on that operation,
        under a name that says what went wrong.


        Error bodies mirror the marketplace API's existing error shape from

        io.narrative.api.model.Error: {"error": "<tag>", "error_description":
        "<message>"}.

        InternalError intentionally has no members; it serializes as "{}".
      properties:
        error:
          type: string
        error_description:
          type: string
      required:
        - error
        - error_description
    UnauthorizedError:
      type: object
      properties:
        error:
          type: string
        error_description:
          type: string
      required:
        - error
        - error_description
    CollaboratorsNotPermittedError:
      type: object
      description: >-
        Only an active app, which Narrative has approved, may be shared with
        `all` companies or by `exclusion`.
      properties:
        error:
          type: string
        error_description:
          type: string
      required:
        - error
        - error_description
    ForbiddenError:
      type: object
      properties:
        error:
          type: string
        error_description:
          type: string
      required:
        - error
        - error_description
    UserTokenRequiredError:
      type: object
      description: >-
        The operation needs a token issued to a user, and the caller's token has
        none.
      properties:
        error:
          type: string
        error_description:
          type: string
      required:
        - error
        - error_description
    AppNotFoundError:
      type: object
      description: >-
        No app with this slug is visible to the caller: it doesn't exist, is
        archived, or (for writes) belongs to another

        company. One error for all three, so the response doesn't reveal which
        slugs exist.
      properties:
        error:
          type: string
        error_description:
          type: string
      required:
        - error
        - error_description
    AppCollaboratorsParticipants:
      type: object
      description: >-
        A set of companies. `all` (every company) and `none` take no
        `company_ids`; `inclusion` (only these) and `exclusion` (every company
        but these) need at least one.
      properties:
        type:
          type: string
          enum:
            - all
            - none
            - inclusion
            - exclusion
        company_ids:
          type: array
          minItems: 1
          items:
            type: integer
            format: int64
            minimum: 0
      required:
        - type
      oneOf:
        - properties:
            type:
              enum:
                - all
                - none
          not:
            required:
              - company_ids
        - properties:
            type:
              enum:
                - inclusion
                - exclusion
          required:
            - company_ids
    OwnedApp:
      type: object
      description: The owning company's view of its app.
      properties:
        id:
          type: integer
          description: The app's id. Installations refer to the app by it.
          format: int64
          minimum: 1
          example: 42
        slug:
          type: string
          description: >-
            1-63 lowercase letters, digits or hyphens, not starting or ending
            with a hyphen, so it works as a URL path segment and as a subdomain.
            Permanent.
          pattern: ^[a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?$
          example: my-connector
        status:
          type: string
          description: >-
            - `pending`: in development. Visible to and installable by the
            owning company and the companies its
              collaborators name.
            - `active`: approved by Narrative. Visible to and installable by the
            owning company and the companies its
              collaborators admit, which may be every company.
            - `archived`: visible to nobody.
          enum:
            - pending
            - active
            - archived
        manifest:
          $ref: '#/components/schemas/AppManifestV2'
          description: The app's manifest. See AppManifestV2 for its fields.
        client_id:
          type: string
          description: >-
            The app's OAuth client id, hex-encoded: the form `POST /oauth/token`
            accepts.
          example: 85b558340b635861575c462a10df3bd5
        collaborators:
          $ref: '#/components/schemas/AppCollaborators'
          description: >-
            The companies, besides the owner, that may see (`view`) and install
            (`install`) the app while it is pending or

            active. See AppCollaborators for its fields.
        created_at:
          type: string
          description: An ISO-8601 local date-time in UTC, without an offset.
          example: '2026-09-24T17:21:03.120581'
        updated_at:
          type: string
          description: An ISO-8601 local date-time in UTC, without an offset.
          example: '2026-09-24T17:21:03.120581'
      required:
        - client_id
        - collaborators
        - created_at
        - id
        - manifest
        - slug
        - status
        - updated_at
    AppManifestV2:
      $defs:
        AppManifestV2Embedding:
          title: AppManifestV2Embedding
          type: object
          properties:
            device_permissions:
              type: array
              items:
                type: string
            initial_guest_path:
              type: string
        AppManifestV2Image:
          title: AppManifestV2Image
          description: >-
            The app's icon on its cards and in connector pickers. Required for
            an active app.
          type: object
          required:
            - name
            - image
            - image_type
            - alt_text
          properties:
            name:
              type: string
            image:
              description: The image data, base64-encoded.
              type: string
            image_type:
              description: The image's media type.
              examples:
                - image/svg+xml
              type: string
            alt_text:
              type: string
            width:
              type: integer
              format: int32
            height:
              type: integer
              format: int32
      title: AppManifestV2
      description: >-
        What the platform needs to install, launch and frame the app. Only
        `manifest_version` and `display_name`

        are required while the app is pending; an active app also needs `icon`.
      type: object
      required:
        - manifest_version
        - display_name
      properties:
        manifest_version:
          description: The manifest format. `1.0.0` is the only supported version.
          type: string
          enum:
            - 1.0.0
        display_name:
          description: The app's name as shown to users. Non-empty, at most 256 characters.
          examples:
            - Facebook Connector
          type: string
        capabilities:
          type: array
          items:
            description: >-
              - `destination_connector`: delivers data to an external
              destination.

              - `model_connector`: connects a model.

              - `connector_api`: implements the connector API at `api_url`,
              which Narrative calls.
            type: string
            enum:
              - destination_connector
              - model_connector
              - connector_api
        api_url:
          description: >-
            The app's own API. Required when `capabilities` includes
            `connector_api`. Must be an absolute https URL.
          examples:
            - https://facebook-connector.example.com/api
          type: string
        required_scopes:
          description: >-
            The permissions an installing company grants the app. `admin` access
            is not allowed.
          type: array
          items:
            $ref: '#/components/schemas/Permission'
        app_token_scopes:
          description: >-
            The permissions of tokens issued to the app itself through `POST
            /oauth/token`. `admin` access is not allowed.
          type: array
          items:
            $ref: '#/components/schemas/Permission'
        ui_url:
          description: >-
            Where the app's UI is served. An app with one opens framed inside
            Narrative; an app without one has no launch button. Must be an
            absolute https URL.
          examples:
            - https://facebook-connector.example.com
          type: string
        embedding:
          $ref: '#/components/schemas/AppManifestV2Embedding'
        icon:
          $ref: '#/components/schemas/AppManifestV2Image'
        docs_url:
          description: >-
            The app's documentation, linked from its connection cards. Must be
            an absolute https URL.
          examples:
            - https://docs.example.com/facebook-connector
          type: string
    Permission:
      description: >-
        One grant: a level of access to one resource. A token carries a list of
        these, and an endpoint checks for the

        exact pair it needs — `read`/`datasets` does not imply
        `write`/`datasets`, and neither implies anything about

        another resource.
      type: object
      required:
        - access
        - resource
      properties:
        access:
          description: The level of access.
          type: string
          enum:
            - read
            - write
        resource:
          $ref: '#/components/schemas/PermissionResource'
      example:
        resource: datasets
        access: read
    AppManifestV2Embedding:
      title: AppManifestV2Embedding
      type: object
      properties:
        device_permissions:
          type: array
          items:
            type: string
        initial_guest_path:
          type: string
    AppManifestV2Image:
      title: AppManifestV2Image
      description: >-
        The app's icon on its cards and in connector pickers. Required for an
        active app.
      type: object
      required:
        - name
        - image
        - image_type
        - alt_text
      properties:
        name:
          type: string
        image:
          description: The image data, base64-encoded.
          type: string
        image_type:
          description: The image's media type.
          examples:
            - image/svg+xml
          type: string
        alt_text:
          type: string
        width:
          type: integer
          format: int32
        height:
          type: integer
          format: int32
    PermissionResource:
      description: >-
        The resource a permission applies to. `schema_template` is also accepted
        on input as a legacy alias for

        `schema_preset`, but responses always use `schema_preset`.
      type: string
      enum:
        - access_tokens
        - agent_conversations
        - api_info
        - app_events
        - app_invites
        - app_profiles
        - apps
        - attribute_derivations
        - attributes
        - billings
        - charges
        - commands_subscriptions_delivery
        - company_info
        - compute_pools
        - connections
        - contracts
        - data_plane_logs
        - data_planes
        - data_streams
        - datasets
        - deliveries
        - destinations
        - encryption_materials
        - events_subscriptions_transaction
        - forecasts
        - inference
        - installations
        - internal_reports
        - jobs
        - lists
        - mappings
        - model_inference
        - model_training
        - models
        - nql
        - payment_methods
        - persistent_permissions
        - products
        - queries
        - resources
        - schema_preset
        - subscriptions
        - uploads
        - usage
        - users
        - views
        - webhooks
        - workflows
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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