/v1/management/conversations/{conversationId}/uploadsBehavior
Use multipart/form-data with one file and optional externalActorRef. Current human control and a ready connection are required. Normal uploads require a live customer window. The controlled pilot accepts purpose=template_header only for JPEG/PNG, allowing asset preparation for an approved template outside that window; it does not permit ordinary media sends outside it. Let your HTTP library supply the multipart boundary. Upload alone sends nothing. JPEG/PNG files are limited to 5 MiB; supported audio, video and documents to 16 MiB. MIME and content must agree. A ready current.mediaId is bound to this integration, conversation and account binding, and expires after 24 hours. Preserve purpose with the original bytes/metadata and UUID. An explicit new upload after uncertainty may leave an unused provider asset.
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.
Required application permissions
conversations:readconversations:send
Explicit whole-business conversation access. Provider selections do not narrow it; customer, calendar or sending scopes do not grant it. Keep the Management key on your backend. Inbox enablement remains separate.
Request
Idempotency and recovery
Persist one UUID and the exact request before sending. After an uncertain result, retain that UUID, body and preconditions; do not create a replacement operation just to retry. Retain the original file bytes and metadata. Check conversation-uploads/{operationId}; a same-UUID unknown upload is never uploaded again.
conversationIdpath · stringRequiredFormat and constraints
{ "type": "string", "format": "uuid" }Idempotency-Keyheader · stringRequiredSave one UUID before dispatch. Keep it for lookup and any exact retry; a different UUID denotes a different operation.
Format and constraints
{ "type": "string", "format": "uuid" }
Request body · required
multipart/form-data · BusinessConversationUploadInput
-
filestring · binaryRequiredOne nonempty supported file. JPEG/PNG: at most 5 MiB; supported audio, video and documents: at most 16 MiB. Declared MIME and file signature must agree. Ogg voice requires mono Opus.
-
externalActorRefstringOptionalOptional audit label from your backend, preserved exactly. CRAD does not verify this external user identity; it grants no permission.
minLength:1maxLength:200 -
purposestringOptionalOptional dedicated JPEG/PNG image asset for a future approved IMAGE-header template send. This upload purpose alone may run outside the customer window; it does not grant text/ordinary media sending or skip template/consent checks.
Value:
"template_header" -
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"file": {
"type": "string",
"format": "binary",
"description": "One nonempty supported file. JPEG/PNG: at most 5 MiB; supported audio, video and documents: at most 16 MiB. Declared MIME and file signature must agree. Ogg voice requires mono Opus."
},
"externalActorRef": {
"type": "string",
"minLength": 1,
"maxLength": 200,
"description": "Optional audit label from your backend, preserved exactly. CRAD does not verify this external user identity; it grants no permission."
},
"purpose": {
"const": "template_header",
"description": "Optional dedicated JPEG/PNG image asset for a future approved IMAGE-header template send. This upload purpose alone may run outside the customer window; it does not grant text/ordinary media sending or skip template/consent checks."
}
},
"required": [
"file"
]
} Successful responses
200 · BusinessConversationUploadResult
Current authorized result.
Cache-Control
{
"const": "no-store"
} application/json · BusinessConversationUploadResult
All of these schema rules apply together.
-
receiptobjectRequiredView nested fields
-
operationIdstring · uuidRequired -
conversationIdstring · uuidRequired -
fileSha256stringRequiredpattern:"^[a-f0-9]{64}$" -
kindstringRequiredAllowed values:
["image","audio","document","video"] -
mimeTypestringRequiredAllowed values:
["image/jpeg","image/png","audio/aac","audio/amr","audio/mpeg","audio/mp4","audio/ogg","video/mp4","video/3gpp","application/pdf","text/plain","application/msword","application/vnd.ms-excel","application/vnd.ms-powerpoint","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.presentationml.presentation"] -
filenamestringRequiredminLength:1maxLength:180 -
sizeintegerRequiredminimum:1maximum:16777216 -
voicebooleanRequired -
externalActorRefanyOf (string | null)RequiredOptional audit label from your backend, preserved exactly. CRAD does not verify this external user identity; it grants no permission.
At least one of these variants must match.
View nested fields
-
anyOf 1stringSchema branchmaxLength:200minLength:1pattern:"^[^\\u0000-\\u001f\\u007f]*\\S[^\\u0000-\\u001f\\u007f]*$" -
anyOf 2nullSchema branch
-
-
purposestringOptionalPresent exactly when the saved upload used this purpose; part of replay identity.
Value:
"template_header" -
additionalPropertiesno value allowedSchema rule
-
-
currentanyOf (object | null)RequiredAt least one of these variants must match.
View nested fields
-
anyOf 1objectSchema branchView branch fields and rules
-
statestringRequired in this branchAllowed values:
["pending","ready","unknown","failed","expired"] -
mediaIdanyOf (string | null)Required in this branchAt least one of these variants must match.
View nested fields
-
anyOf 1string · uuidSchema branch -
anyOf 2nullSchema branch
-
-
expiresAtanyOf (string | null)Required in this branchAt least one of these variants must match.
View nested fields
-
anyOf 1string · date-timeSchema branch -
anyOf 2nullSchema branch
-
-
errorCodeanyOf (string | null)Required in this branchAt least one of these variants must match.
View nested fields
-
anyOf 1stringSchema branchpattern:"^[a-z][a-z0-9_]{0,79}$" -
anyOf 2nullSchema branch
-
-
additionalPropertiesno value allowedSchema rule
-
-
anyOf 2nullSchema branch
-
-
currentUnavailableReasonstring | nullRequiredAllowed values:
["conversation_not_found",null] -
replayedbooleanRequired -
allOf 1unspecifiedSchema branchView branch fields and rules
-
ifobjectSchema ruleView branch fields and rules
-
currentnullCondition predicate
-
-
thenobjectSchema ruleView branch fields and rules
-
currentUnavailableReasonstringOptional in this branchValue:
"conversation_not_found"
-
-
elseobjectSchema ruleView branch fields and rules
-
currentUnavailableReasonnullOptional in this branch
-
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"type": "object",
"additionalProperties": false,
"properties": {
"receipt": {
"type": "object",
"additionalProperties": false,
"properties": {
"operationId": {
"type": "string",
"format": "uuid"
},
"conversationId": {
"type": "string",
"format": "uuid"
},
"fileSha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"kind": {
"enum": [
"image",
"audio",
"document",
"video"
]
},
"mimeType": {
"enum": [
"image/jpeg",
"image/png",
"audio/aac",
"audio/amr",
"audio/mpeg",
"audio/mp4",
"audio/ogg",
"video/mp4",
"video/3gpp",
"application/pdf",
"text/plain",
"application/msword",
"application/vnd.ms-excel",
"application/vnd.ms-powerpoint",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
"application/vnd.openxmlformats-officedocument.presentationml.presentation"
]
},
"filename": {
"type": "string",
"minLength": 1,
"maxLength": 180
},
"size": {
"type": "integer",
"minimum": 1,
"maximum": 16777216
},
"voice": {
"type": "boolean"
},
"externalActorRef": {
"anyOf": [
{
"type": "string",
"maxLength": 200,
"minLength": 1,
"pattern": "^[^\\u0000-\\u001f\\u007f]*\\S[^\\u0000-\\u001f\\u007f]*$"
},
{
"type": "null"
}
],
"description": "Optional audit label from your backend, preserved exactly. CRAD does not verify this external user identity; it grants no permission."
},
"purpose": {
"const": "template_header",
"description": "Present exactly when the saved upload used this purpose; part of replay identity."
}
},
"required": [
"operationId",
"conversationId",
"fileSha256",
"kind",
"mimeType",
"filename",
"size",
"voice",
"externalActorRef"
]
},
"current": {
"anyOf": [
{
"type": "object",
"additionalProperties": false,
"properties": {
"state": {
"enum": [
"pending",
"ready",
"unknown",
"failed",
"expired"
]
},
"mediaId": {
"anyOf": [
{
"type": "string",
"format": "uuid"
},
{
"type": "null"
}
]
},
"expiresAt": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
]
},
"errorCode": {
"anyOf": [
{
"type": "string",
"pattern": "^[a-z][a-z0-9_]{0,79}$"
},
{
"type": "null"
}
]
}
},
"required": [
"state",
"mediaId",
"expiresAt",
"errorCode"
]
},
{
"type": "null"
}
]
},
"currentUnavailableReason": {
"enum": [
"conversation_not_found",
null
]
},
"replayed": {
"type": "boolean"
}
},
"required": [
"receipt",
"current",
"currentUnavailableReason",
"replayed"
],
"allOf": [
{
"if": {
"properties": {
"current": {
"type": "null"
}
}
},
"then": {
"properties": {
"currentUnavailableReason": {
"const": "conversation_not_found"
}
}
},
"else": {
"properties": {
"currentUnavailableReason": {
"type": "null"
}
}
}
}
]
} Errors and recovery
Error responses declared in the contract (11)
The preview contract shares generic error definitions across operations. This list is not an exhaustive list of runtime errors.
401 · Missing or invalid Management credential.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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 · Current authority or scope denied, browser Origin refused, or inbox not enabled.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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 · Conversation, retained message or usable media not found. Expired or foreign upload handles cannot be sent.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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, consent, control ownership or service window prevents this command; OPERATION_CONFLICT means the same UUID was used with different input. Unknown prior sends require review, never automatic redispatch.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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"
]
} 413 · Request or file exceeds the supported size.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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"
]
} 415 · Unsupported Content-Type, unsupported media or mismatch between declared MIME and file content.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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 or ambiguous input, unsupported query parameter, UUID or body field.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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"
]
} 428 · Missing required Idempotency-Key or If-Match.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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 · Request or send quota exceeded. Honor Retry-After when present.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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 · Outcome may be uncertain. Keep the original request identity and use the read-only recovery endpoint; do not create a fresh send.
Cache-Control
{
"const": "no-store"
} application/json · Error
-
errorobjectRequiredView nested fields
-
codestringRequired -
requestIdstring · uuidRequired -
retryAfterintegerOptionalminimum:1 -
additionalPropertiesno value allowedSchema rule
-
-
additionalPropertiesno value allowedSchema rule
Complete schema and nested fields
{
"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"
]
}