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

# 프리사인드 URL 갱신

> 만료된 업로드 URL을 재발급합니다. live 키는 S3 presigned URL을 받고, 테스트 키는 절대 `https://api.bizmori.com/api/v2/test-uploads/{signedToken}` URL을 받습니다. 두 URL은 1시간 동안 유효합니다.
- `pending` 상태의 주문에서만 사용 가능
- 테스트 주문은 저장소 프리사인드 URL 대신 BIZ MORI 테스트 업로드 URL을 반환합니다




## OpenAPI

````yaml ko/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는 디지털 콘텐츠 보호를 위한 네 가지 핵심 서비스를 제공합니다:

    - **Anti-AI**: 이미지를 AI 학습으로부터 보호

    - **Watermark Embed**: 이미지에 보이지 않는 디지털 워터마크 삽입

    - **Watermark Extract**: 이미지에서 워터마크 추출 및 검증

    - **AI Detection**: 이미지가 AI로 생성되었는지 감지

    - **테스트 API 키**: `sk_test_` 접두사의 키는 동일한 Bearer 인증을 사용하며, 실제 처리 서비스나 크레딧 사용
    없이 주문 흐름을 검증할 수 있습니다. 테스트 업로드는 파일 내용을 폐기하고 결과 파일을 만들지 않습니다
  contact:
    name: BIZ MORI 지원
    email: support@bizmori.com
  license:
    name: Proprietary
    url: https://docs.bizmori.com/legal/terms
servers:
  - url: https://api.bizmori.com
    description: 프로덕션
security: []
tags:
  - name: Anti-AI
    description: AI 학습 방지 이미지 보호 주문
  - name: Watermark Embed
    description: 워터마크 삽입 주문
  - name: Watermark Extract
    description: 워터마크 추출 주문
  - name: AI Detection
    description: AI 생성 이미지 감지 주문
  - name: Orders
    description: 주문 조회 및 관리
  - name: Webhooks
    description: 웹훅 설정 및 이벤트
paths:
  /api/v2/orders/{orderId}/refresh-urls:
    post:
      tags:
        - Orders
      summary: 프리사인드 URL 갱신
      description: >
        만료된 업로드 URL을 재발급합니다. live 키는 S3 presigned URL을 받고, 테스트 키는 절대
        `https://api.bizmori.com/api/v2/test-uploads/{signedToken}` URL을 받습니다. 두
        URL은 1시간 동안 유효합니다.

        - `pending` 상태의 주문에서만 사용 가능

        - 테스트 주문은 저장소 프리사인드 URL 대신 BIZ MORI 테스트 업로드 URL을 반환합니다
      operationId: refreshOrderUrls
      parameters:
        - in: path
          name: orderId
          required: true
          schema:
            type: string
          description: 주문 ID
      responses:
        '200':
          description: URL 갱신 성공
          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/NotFound'
      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: 파일 ID
        fileName:
          type: string
          description: 파일 이름
        uploadUrl:
          type: string
          format: uri
          description: >-
            업로드 URL. live 키는 S3 presigned URL을 받고, 테스트 키는 절대
            `https://api.bizmori.com/api/v2/test-uploads/{signedToken}` URL을
            받습니다. 두 URL은 발급 후 1시간 동안 유효하며 `POST
            /api/v2/orders/{orderId}/refresh-urls`로 재발급할 수 있습니다. signed token
            자체가 테스트 업로드를 인가하므로 PUT에 Authorization 헤더가 필요 없습니다. 테스트 요청 본문은 스트림으로
            소비되어 저장되지 않으며, 테스트 주문은 사용량 차감이나 실제 외부 처리 없이 모의 결과로 전이합니다.
        fileKey:
          type: string
          description: |
            파일 식별자: live 키에서는 S3 object key이고 테스트 키에서는 격리된 logical key입니다.
    ErrorResponse:
      type: object
      properties:
        code:
          type: string
          description: 에러 코드
  responses:
    Unauthorized:
      description: 인증 실패
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: AUTH_NOT_AUTHENTICATED
    NotFound:
      description: 리소스를 찾을 수 없음
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
          example:
            code: RESOURCE_NOT_FOUND
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: >-
        외부 클라이언트 접근을 위한 Bearer API 키. 일반 키는 `sk_` 접두사를 사용하고, 테스트 키는 `sk_test_`
        접두사로 모의 응답을 사용해 실제 처리나 크레딧 사용 없이 주문 흐름을 검증합니다.

````