CRADالمطوّرون
العربية

Recover the original resumable-image receipt

قبل الاستخدام الفعلي — افحص القدرات المنشورة والصلاحيات وجاهزية ربطك.

تحقّق من القدرات المنشورة وصلاحيات المفتاح وجاهزية النشاط في بيئتك. أمثلة HTTP مسجّلة من اختبارات معزولة؛ وصفها local-unreleased لا يعني أن API غير عامل ولا يُثبت جاهزية ربطك. في مسار العميل يُتحقق من الهاتف بقالب واتساب أعدّه النشاط؛ SMS غير مدعوم. التسجيل بواسطة مسؤول مخوّل عملية منفصلة دون رمز.

GET/v1/management/whatsapp-images/operations/{operationId}

Behavior

Backend-only Management credential; no Origin header or caller-selected business/phone/WABA/token. Requires the current write scope for the receipt's saved purpose and the same integration. No provider request or raw handle disclosure; ready is not usable after expiry or binding changes.

Authentication

ManagementCredential

Credential rules

One server-only owner-issued wbm_ API key can carry both management and integration permissions. Additional permissions require an explicit owner-issued grant. GET /v1/management returns the management discovery view, which may be empty for a booking-only key. For credentials with appointments:read, this discovery view omits whatsapp-templates:read, whatsapp-templates:write, whatsapp-profile:read and whatsapp-profile:write to preserve calendar-client compatibility. Discover these grants through GET /v1/management/messaging-capabilities. Template/profile command authorization still uses the stored grants. Server-only owner-issued Management authority with explicit application permissions. Calling this API does not expand a credential's grants. contacts:read/write/block/sync/fields:read/fields:write are separate approvals for canonical business contacts; fields also require current typed owner grants. contacts:record remains contact recording/recovery only. These grants create no customer phone proof, booking authority, messaging consent or automatic synchronization. Hours/blocks retain their independent resource grants. booking-policy:read/write separately delegate whole-business booking settings, without schedule/provider grants; write requires read. They preserve existing appointments and create no duration-rewrite authority. Provider duration policy additionally requires explicit provider-booking-policy:read/write and exact current providerIds; booking-duration:rewrite is separately approved and does not itself grant policy read/write. Service catalogue requires explicit services:read/write, independent of provider/calendar/schedule resources; write requires read. These operations do not expand an existing credential's grants. Public presentation and reviewed service selection require explicit website-content:read/write; write requires read, independently from services:* and provider resources. Existing provider metadata/activity/assignment additionally requires providers:read/write and a nonempty explicit current providerIds grant; write requires read. This grants no provider creation, deletion, login, invitation or schedule authority. WhatsApp template/profile management requires separate whatsapp-templates:read, whatsapp-templates:write, whatsapp-profile:read and whatsapp-profile:write application scopes. Write requires its matching read scope. These grants require explicit owner approval; Meta OAuth permissions remain separate.

For saved purpose template_header, require whatsapp-templates:read and whatsapp-templates:write. For saved purpose business_profile, require whatsapp-profile:read and whatsapp-profile:write. The purpose-specific write grant is checked against the original upload, not a caller-selected substitute.

Request

  • operationIdpath · stringRequired
    Format and constraints
    operationId schema
    {
      "type": "string",
      "format": "uuid"
    }

Successful responses

200 · application/json

Current authorized image or operation result. A ready upload is purpose-bound, not a message send or template approval.

Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json

Exactly one of these variants must match.

  • oneOf 1 · kind = "upload"objectSchema branch

    Keep original UUID, purpose, filename and file bytes. Exact retries recover this attempt without re-uploading. An unknown upload is never automatically restarted. ready is usable only while the returned expiry and current binding/purpose checks remain valid.

    View branch fields and rules
    • operationIdstring · uuidRequired in this branch
    • requestHashstringRequired in this branch

      pattern: "^[a-f0-9]{64}$"

    • statestringRequired in this branch

      Allowed values: ["pending","ready","rejected","unknown"]

    • errorCodestring | nullRequired in this branch

      pattern: "^[a-z_]{1,80}$"

    • createdAtstring · date-timeRequired in this branch
    • completedAtstring | null · date-timeRequired in this branch
    • replayedbooleanRequired in this branch
    • kindstringRequired in this branch

      Value: "upload"

    • requestobjectRequired in this branch
      View nested fields
      • purposestringRequired in this branch

        Allowed values: ["template_header","business_profile"]

      • mimeTypestringRequired in this branch

        Allowed values: ["image/jpeg","image/png"]

      • filenamestringRequired in this branch

        minLength: 1maxLength: 180

      • byteSizeintegerRequired in this branch

        minimum: 1maximum: 5242880

      • sha256stringRequired in this branch

        pattern: "^[a-f0-9]{64}$"

      • additionalPropertiesno value allowedSchema rule
    • uploadobjectRequired in this branch

      Internal resumable-image identity. Bound to this business, integration, connection and purpose, with a conservative CRAD 24-hour lifetime. No raw Meta handle is returned. Distinct from a conversation mediaId and cannot be sent as headerImageUploadId.

      View nested fields
      • uploadIdstring · uuidRequired in this branch
      • purposestringRequired in this branch

        Allowed values: ["template_header","business_profile"]

      • mimeTypestringRequired in this branch

        Allowed values: ["image/jpeg","image/png"]

      • filenamestringRequired in this branch

        minLength: 1maxLength: 180

      • byteSizeintegerRequired in this branch

        minimum: 1maximum: 5242880

      • sha256stringRequired in this branch

        pattern: "^[a-f0-9]{64}$"

      • expiresAtstring · date-timeRequired in this branch
      • additionalPropertiesno value allowedSchema rule
    • reviewedAtnullOptional in this branch

      Uploads have no owner-review transition. Older producers may omit this member.

    • additionalPropertiesno value allowedSchema rule
  • oneOf 2 · status = "not_found"objectSchema branch

    No visible receipt exists at this instant. This is not proof that a concurrent operation was cancelled or that a fresh UUID is safe.

    View branch fields and rules
    • statusstringRequired in this branch

      Value: "not_found"

    • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "oneOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "operationId": {
          "type": "string",
          "format": "uuid"
        },
        "requestHash": {
          "type": "string",
          "pattern": "^[a-f0-9]{64}$"
        },
        "state": {
          "enum": [
            "pending",
            "ready",
            "rejected",
            "unknown"
          ]
        },
        "errorCode": {
          "type": [
            "string",
            "null"
          ],
          "pattern": "^[a-z_]{1,80}$"
        },
        "createdAt": {
          "type": "string",
          "format": "date-time"
        },
        "completedAt": {
          "type": [
            "string",
            "null"
          ],
          "format": "date-time"
        },
        "replayed": {
          "type": "boolean"
        },
        "kind": {
          "const": "upload"
        },
        "request": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "purpose": {
              "enum": [
                "template_header",
                "business_profile"
              ]
            },
            "mimeType": {
              "enum": [
                "image/jpeg",
                "image/png"
              ]
            },
            "filename": {
              "type": "string",
              "minLength": 1,
              "maxLength": 180
            },
            "byteSize": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5242880
            },
            "sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            }
          },
          "required": [
            "purpose",
            "mimeType",
            "filename",
            "byteSize",
            "sha256"
          ]
        },
        "upload": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "uploadId": {
              "type": "string",
              "format": "uuid"
            },
            "purpose": {
              "enum": [
                "template_header",
                "business_profile"
              ]
            },
            "mimeType": {
              "enum": [
                "image/jpeg",
                "image/png"
              ]
            },
            "filename": {
              "type": "string",
              "minLength": 1,
              "maxLength": 180
            },
            "byteSize": {
              "type": "integer",
              "minimum": 1,
              "maximum": 5242880
            },
            "sha256": {
              "type": "string",
              "pattern": "^[a-f0-9]{64}$"
            },
            "expiresAt": {
              "type": "string",
              "format": "date-time"
            }
          },
          "required": [
            "uploadId",
            "purpose",
            "mimeType",
            "filename",
            "byteSize",
            "sha256",
            "expiresAt"
          ],
          "description": "Internal resumable-image identity. Bound to this business, integration, connection and purpose, with a conservative CRAD 24-hour lifetime. No raw Meta handle is returned. Distinct from a conversation mediaId and cannot be sent as headerImageUploadId."
        },
        "reviewedAt": {
          "type": "null",
          "description": "Uploads have no owner-review transition. Older producers may omit this member."
        }
      },
      "required": [
        "operationId",
        "requestHash",
        "state",
        "errorCode",
        "createdAt",
        "completedAt",
        "replayed",
        "kind",
        "request",
        "upload"
      ],
      "description": "Keep original UUID, purpose, filename and file bytes. Exact retries recover this attempt without re-uploading. An unknown upload is never automatically restarted. ready is usable only while the returned expiry and current binding/purpose checks remain valid."
    },
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "status": {
          "const": "not_found"
        }
      },
      "required": [
        "status"
      ],
      "description": "No visible receipt exists at this instant. This is not proof that a concurrent operation was cancelled or that a fresh UUID is safe."
    }
  ]
}

Errors and recovery

Error responses declared in the contract (8)

The preview contract shares generic error definitions across operations. This list is not an exhaustive list of runtime errors.

401 · Missing or invalid server credential.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
403 · Scope, credential, integration or business authority denied; browser Origin is refused.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
404 · Owned resource or usable same-purpose current-binding image not found.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
405 · Unsupported HTTP method.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
409 · Connection changed/blocked, conflicting operation UUID, unresolved write, expired claim or owner review required. No automatic provider redispatch.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
422 · Invalid/unknown field, unsupported selector/query, UUID, precondition or template shape.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
429 · Credential/request or local template rate limit; honor Retry-After when supplied.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}
503 · Configuration, provider or persistence unavailable; retain original operation identity because outcome may be uncertain.
Cache-Control
Cache-Control schema
{
  "const": "no-store"
}

application/json · Error

  • errorobjectRequired
    View nested fields
    • codestringRequired
    • requestIdstring · uuidRequired
    • retryAfterintegerOptional

      minimum: 1

    • additionalPropertiesno value allowedSchema rule
  • additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
JSON Schema
{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "error": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "code": {
          "type": "string"
        },
        "requestId": {
          "type": "string",
          "format": "uuid"
        },
        "retryAfter": {
          "type": "integer",
          "minimum": 1
        }
      },
      "required": [
        "code",
        "requestId"
      ]
    }
  },
  "required": [
    "error"
  ]
}