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

# Refresh presigned URLs

> Reissue expired upload URLs. Live keys receive S3 presigned URLs; test keys receive absolute `https://api.bizmori.com/api/v2/test-uploads/{signedToken}` URLs. Both are valid for one hour.
- Only available for orders with `pending` status
- For test orders, the response contains a BIZ MORI test upload URL instead of a storage presigned URL


For a test order, this endpoint reissues an upload URL for a file that has not been uploaded yet. The returned URL is a BIZ MORI test upload URL rather than a storage presigned URL.


## OpenAPI

````yaml api-reference/openapi.yaml POST /api/v2/orders/{orderId}/refresh-urls
openapi: 3.0.0
info:
  title: BIZ MORI API
  version: 2.0.0
  description: >
    BIZ MORI API provides four core services for digital content protection:

    - **Anti-AI**: Protect images from AI training

    - **Watermark Embed**: Embed invisible digital watermarks into images

    - **Watermark Extract**: Extract and verify watermarks from images

    - **AI Detection**: Detect whether an image is AI-generated

    - **Test API keys**: Keys with the `sk_test_` prefix use the same Bearer
    authentication and support order-lifecycle testing with mock responses
    without running processing services or consuming credits; test uploads
    discard file contents and do not create result files
  contact:
    name: BIZ MORI Support
    email: support@contentcare.ai
  license:
    name: Proprietary
    url: https://docs.contentcare.ai/legal/terms
servers:
  - url: https://api.bizmori.com
    description: Production
security: []
tags:
  - name: Anti-AI
    description: Anti-AI image protection orders
  - name: Watermark Embed
    description: Watermark embedding orders
  - name: Watermark Extract
    description: Watermark extraction orders
  - name: AI Detection
    description: AI-generated image detection orders
  - name: Orders
    description: Order query and management
  - name: Webhooks
    description: Webhook configuration and events
  - name: Reports
    description: PDF analysis reports for watermark extract and AI Detection orders
paths:
  /api/v2/orders/{orderId}/refresh-urls:
    post:
      tags:
        - Orders
      summary: Refresh presigned URLs
      description: >
        Reissue expired upload URLs. Live keys receive S3 presigned URLs; test
        keys receive absolute
        `https://api.bizmori.com/api/v2/test-uploads/{signedToken}` URLs. Both
        are valid for one hour.

        - Only available for orders with `pending` status

        - For test orders, the response contains a BIZ MORI test upload URL
        instead of a storage presigned URL
      operationId: refreshOrderUrls
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
          description: Order ID
      responses:
        '200':
          description: URLs refreshed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    type: object
                    properties:
                      files:
                        type: array
                        items:
                          $ref: '#/components/schemas/OrderFile'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '404':
          $ref: '#/components/responses/WebhookNotFound'
      security:
        - BearerAuth: []
      x-codeSamples:
        - lang: curl
          label: cURL
          source: >-
            curl -X POST
            https://api.bizmori.com/api/v2/orders/ORDER_ID/refresh-urls \
              -H "Authorization: Bearer YOUR_API_TOKEN"
        - lang: javascript
          label: JavaScript
          source: |-
            const orderId = 'ORDER_ID';
            const response = await fetch(
              `https://api.bizmori.com/api/v2/orders/${orderId}/refresh-urls`,
              {
                method: 'POST',
                headers: { 'Authorization': 'Bearer YOUR_API_TOKEN' }
              }
            );
            const data = await response.json();
        - lang: python
          label: Python
          source: |-
            import requests

            order_id = 'ORDER_ID'
            response = requests.post(
                f'https://api.bizmori.com/api/v2/orders/{order_id}/refresh-urls',
                headers={'Authorization': 'Bearer YOUR_API_TOKEN'}
            )
            data = response.json()
components:
  schemas:
    OrderFile:
      type: object
      properties:
        fileId:
          type: string
          description: File ID
        fileName:
          type: string
          description: File name
        uploadUrl:
          type: string
          format: uri
          description: >-
            Upload URL. Live keys receive an S3 presigned URL; test keys receive
            an absolute
            `https://api.bizmori.com/api/v2/test-uploads/{signedToken}` URL.
            Both expire one hour after issue and can be renewed with `POST
            /api/v2/orders/{orderId}/refresh-urls`. PUT needs no Authorization
            header because the signed token authorizes the test upload. Test
            request bodies are streamed, not stored; test orders move to
            simulated results without usage consumption or actual external
            processing.
        fileKey:
          type: string
          description: >
            File identifier: an S3 object key for live keys or an isolated
            logical key for test keys.
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: Error code
  responses:
    Unauthorized:
      description: Authentication failed
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: AUTH_NOT_AUTHENTICATED
    WebhookNotFound:
      description: Webhook endpoint not found or not accessible to this API key
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: WEBHOOK_NOT_FOUND
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer API key for external client access. Live keys use the `sk_`
        prefix; test keys use the `sk_test_` prefix and support order-lifecycle
        testing with mock responses without processing or credit usage.

````

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