1. medias
Peach
  • template-messages
    • Send a pre-approved template message
      POST
    • Poll template message status
      GET
    • Poll template messages status
      GET
    • Connect to AI Agent
      POST
    • Send an App message
      POST
  • broadcasts
    • List broadcasts
      GET
    • Launch a broadcast
      POST
    • Poll broadcast status
      GET
    • Get broadcast details
      GET
    • Archive broadcast
      PATCH
    • Cancel broadcast
      PATCH
  • whatsapp_templates
    • List all templates
      GET
    • Create a template
      POST
    • Update template
      PATCH
    • Archive template
      PATCH
    • Pause template
      PATCH
    • Submit template
      PATCH
    • Fetch template details
      GET
  • conversations
    • List messages
      GET
    • List conversations
      GET
    • Update conversation status
      PATCH
    • Agent Assignment
      POST
    • Close Conversation
      POST
  • contacts
    • Create multiple contacts
    • Update a contact
    • Create a contact
    • Bulk update communication preferences
  • orders
    • Create an order
    • Find order by ID
    • Create a refund for an order
  • medias
    • About uploaded media
    • List available medias
      GET
    • Add a media (Deprecated)
      POST
    • Remove a media
      DELETE
    • Create a direct upload for media
      POST
    • Finalize a direct uploaded media
      POST
  • webhooks
    • Order status webhooks
    • Flow execution status webhooks
    • Message delivery status webhooks
    • AI Agent Execution Webhooks
  • Schemas
    • Schemas
      • WhatsApp Template
      • WhatsApp Template Parameters
      • Order
      • RefundRequest
      • Contact
      • LineItem
      • OrderExpiry
      • TemplateMessage
      • AnyValue
      • Argument
      • Message
      • MessageResponse
  1. medias

Finalize a direct uploaded media

POST
https://app.trypeach.io/api/v1/medias/finalize
Attach a direct-uploaded blob into the media library and return a media:// reference.

Request

Authorization
Add parameter in header
Authorization
Example:
Authorization: ********************
Body Params application/json

Example
{
    "signed_id": "string"
}

Request Code Samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://app.trypeach.io/api/v1/medias/finalize' \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "signed_id": "string"
}'

Responses

🟢201Created
application/json
Body

Example
{
    "content_type": "image/png",
    "created_at": "2024-07-15T09:12:24.464Z",
    "filename": "sample.png",
    "id": 1,
    "signed_id": "eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--example",
    "media_url": "media://11"
}
🟠404Not Found
Modified at 2026-04-22 04:48:04
Previous
Create a direct upload for media
Next
Order status webhooks
Built with