channel_connections.profile_photo
Trocar a foto do perfil de um número de WhatsApp. Recebe a imagem (JPEG ou PNG, até 5 MB, em base64), envia à Meta pelo envio retomável (/{app_id}/uploads) e liga o resultado ao perfil (profile_picture_handle). Não vale para número em coexistência (a foto é do app WhatsApp Business). Exige META_APP_ID no servidor.
- Endpoint:
POST https://app.atomiks.com.br/api/v1/channel_connections.profile_photo(corpo JSON) - Quem pode chamar: administrador da conta
- Escopo da chave:
channels:write - Grava dados: sim
- Pela chave de API: sim
- Ferramenta MCP:
channel_connections_profile_photo - Ficha em JSON:
https://app.atomiks.com.br/api/v1/openapi.json(operationIdchannel_connections.profile_photo)
Entrada
| Campo | Tipo | Obrigatório | Nota |
|---|---|---|---|
channelId | string (uuid) | sim | |
mimeType | "image/jpeg" | "image/png" | sim | |
dataBase64 | string | sim |
JSON Schema
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"channelId": {
"type": "string",
"format": "uuid",
"pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"
},
"mimeType": {
"type": "string",
"enum": [
"image/jpeg",
"image/png"
]
},
"dataBase64": {
"type": "string",
"minLength": 1,
"maxLength": 7340032
}
},
"required": [
"channelId",
"mimeType",
"dataBase64"
]
}Exemplo
curl -X POST https://app.atomiks.com.br/api/v1/channel_connections.profile_photo \
-H "Authorization: Bearer $ATOMIKS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"channelId":"00000000-0000-0000-0000-000000000000","mimeType":"image/png","dataBase64":"iVBORw0KGgo="}'CLI:
node cli/atomiks.mjs channel_connections.profile_photo --json '{"channelId":"00000000-0000-0000-0000-000000000000","mimeType":"image/png","dataBase64":"iVBORw0KGgo="}'MCP: ferramenta channel_connections_profile_photo com a mesma entrada.
Saída
Sucesso: {"data": ...} com o formato abaixo.
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"properties": {
"about": {
"type": [
"string",
"null"
]
},
"description": {
"type": [
"string",
"null"
]
},
"address": {
"type": [
"string",
"null"
]
},
"email": {
"type": [
"string",
"null"
]
},
"vertical": {
"type": [
"string",
"null"
]
},
"websites": {
"type": "array",
"items": {
"type": "string"
}
},
"profilePictureUrl": {
"type": [
"string",
"null"
]
},
"displayName": {
"type": [
"string",
"null"
]
},
"nameUnderReview": {
"type": "boolean"
},
"coexistence": {
"type": "boolean"
}
},
"required": [
"about",
"description",
"address",
"email",
"vertical",
"websites",
"profilePictureUrl",
"displayName",
"nameUnderReview",
"coexistence"
],
"additionalProperties": false
}Erros
{"error": {"code", "message", "requestId"}}. Códigos: invalid_input (400), unauthorized (401), forbidden / account_pending / scope_missing (403), not_found (404), limit_reached (409), internal (500).