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

# Extend a share

> A new expiry, counted from today, or none (`expires_in_days: null`).
An expired share comes back.

**Required roles**: `nx1_catalog_admin` and a Data Access grant role



## OpenAPI

````yaml post /api/data-shares/{share_id}/extend
openapi: 3.1.0
info:
  title: Nx1 AI API
  description: |

    AI API for Nx1 Data Platform Management and Automated Data Tasks.

    Authentication is required via PSK in Authorization header.

    Default PSK is | [ask a friend] |
  version: 0.10.2
servers: []
security: []
paths:
  /api/data-shares/{share_id}/extend:
    post:
      tags:
        - Data shares
      summary: Extend a share
      description: |-
        A new expiry, counted from today, or none (`expires_in_days: null`).
        An expired share comes back.

        **Required roles**: `nx1_catalog_admin` and a Data Access grant role
      operationId: extend_share_api_data_shares__share_id__extend_post
      parameters:
        - name: share_id
          in: path
          required: true
          schema:
            type: string
            pattern: ^[0-9a-fA-F-]{36}$
            title: Share Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ShareExtendRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ShareDetail'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
          description: Too Many Requests
        '502':
          description: Bad Gateway
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - OAuth2AuthorizationCodeBearer: []
        - APIKeyHeader: []
components:
  schemas:
    ShareExtendRequest:
      properties:
        expires_in_days:
          anyOf:
            - type: integer
              maximum: 730
              minimum: 1
            - type: 'null'
          title: Expires In Days
      type: object
      required:
        - expires_in_days
      title: ShareExtendRequest
    ShareDetail:
      properties:
        id:
          type: string
          title: Id
        slug:
          type: string
          title: Slug
        name:
          type: string
          title: Name
        purpose:
          type: string
          title: Purpose
          default: ''
        recipient_kind:
          type: string
          title: Recipient Kind
        recipient_name:
          type: string
          title: Recipient Name
        recipient_url:
          type: string
          title: Recipient Url
          default: ''
        warehouse:
          type: string
          title: Warehouse
        roles:
          items:
            type: string
          type: array
          title: Roles
        tables:
          items:
            type: string
          type: array
          title: Tables
        status:
          type: string
          title: Status
        expires_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Expires At
        expires_soon:
          type: boolean
          title: Expires Soon
          default: false
        owner:
          type: string
          title: Owner
        created_at:
          type: string
          title: Created At
        key_hint:
          type: string
          title: Key Hint
          default: ''
        last_read_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Read At
        principal:
          type: string
          title: Principal
          default: ''
        client_id:
          type: string
          title: Client Id
          default: ''
        key_created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Key Created At
        activated_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Activated At
        revoked_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Revoked At
        revoked_by:
          type: string
          title: Revoked By
          default: ''
        policies:
          items:
            additionalProperties: true
            type: object
          type: array
          title: Policies
      type: object
      required:
        - id
        - slug
        - name
        - recipient_kind
        - recipient_name
        - warehouse
        - status
        - owner
        - created_at
      title: ShareDetail
    ErrorResponse:
      properties:
        error:
          type: string
          title: Error
          description: A brief description of the error that occurred.
        code:
          type: integer
          title: Code
          description: The HTTP status code associated with the error.
          default: 500
      type: object
      required:
        - error
      title: ErrorResponse
  securitySchemes:
    OAuth2AuthorizationCodeBearer:
      type: oauth2
      flows:
        authorizationCode:
          scopes: {}
          authorizationUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/auth
          tokenUrl: >-
            https://sso-rapid.rapid.nx1cloud.com/realms/rapid/protocol/openid-connect/token
    APIKeyHeader:
      type: apiKey
      in: header
      name: Authorization-PSK

````

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