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

# Set the group photo

> Send `multipart/form-data` with one part, a JPEG file named `file`, square, at least 192 px, up to 5 MB.
Asynchronous: `202` with a `requestId`; the outcome arrives as a `whatsapp.group.updated` event.




## OpenAPI

````yaml api-reference/openapi.yaml PUT /channels/{ch}/whatsapp/groups/{groupId}/photo
openapi: 3.1.0
info:
  title: HookMyApp API
  version: 1.0.0
  description: >
    The HookMyApp REST API. Everything the dashboard and the CLI can do, your

    code and your AI agents can do too.


    ## Authentication


    Two kinds of Bearer credentials exist. Do not mix them up:


    - **API key (`hmok_...`)** authenticates *you* (or your agent) to
      `https://api.hookmyapp.com`.
      Create one in the dashboard under **Org → API keys → Create API Key**
      (full org access, optional expiration date, reveal or
      revoke it any time from that page), or without a
      browser via the [agent auth flow](#tag/agent-auth) described in
      [`GET /auth.md`](https://api.hookmyapp.com/auth.md). That flow can mint a
      scope-limited key. Send it as `Authorization: Bearer hmok_...`, or on
      `/mcp` as `X-API-Key: hmok_...`. Use it for org, workspace, customer,
      channel and webhook management.
    - **Channel token (`hmat_...`)** sends messages, replies to comments, and
      publishes from one connected channel.
      Mint it with `GET /meta/channels/{id}/token`. It is not valid on
      `https://api.hookmyapp.com`.
      The same sends, replies and publishing are also available with the API key under
      `/channels/{ch}` (see the Channel actions tag).

    Browser sessions from the dashboard use the same endpoints with a session

    cookie or WorkOS JWT instead of `hmok_`.


    ## IDs


    Every ID on the wire is a typed public ID, never an internal UUID:

    `ws_` workspace/customer, `ch_` channel, `org_` organization,

    `cred_` connection credential, `ac_` agent credential.


    ## Workspace context


    Workspace-scoped routes (channels, webhook config, and deliveries) resolve
    the

    workspace from the `X-Workspace-Id: ws_XXXXXXXX` header.


    ## Errors


    Errors return a stable machine-readable `code` plus a human `message`.

    Agent tokens that exceed their granted scopes get `403
    AGENT_SCOPE_INSUFFICIENT`.


    ## Webhook signatures


    Deliveries to your webhook are signed with `X-HookMyApp-Signature-256`,

    an HMAC-SHA256 of the raw body keyed on the channel `WEBHOOK_HMAC_SECRET`.

    The Verify Token is a separate value used only for the GET ownership probe.
servers:
  - url: https://api.hookmyapp.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Agent auth
    description: Register an agent credential (`hmok_`) with email OTP, no browser needed
  - name: Organizations
    description: Your organization and its summary
  - name: Customers
    description: Customer workspaces you run messaging for (SaaS Mode)
  - name: Onboarding links
    description: Links your customers open to connect their own channels
  - name: Workspaces
    description: Team workspaces
  - name: Channels
    description: Connected WhatsApp and Instagram channels, and their channel tokens
  - name: Webhook config
    description: Where inbound events are delivered for a channel
  - name: Deliveries
    description: Inspect inbound delivery logs and app responses
  - name: Event subscriptions
    description: >-
      Extra URLs that receive a channel's events, next to its main webhook
      destination
  - name: Channel actions
    description: >-
      Send, reply, moderate and publish on a channel with the API key; the
      channel token stays server-side
paths:
  /channels/{ch}/whatsapp/groups/{groupId}/photo:
    put:
      tags:
        - Channel actions
      summary: Set the group photo
      description: >
        Send `multipart/form-data` with one part, a JPEG file named `file`,
        square, at least 192 px, up to 5 MB.

        Asynchronous: `202` with a `requestId`; the outcome arrives as a
        `whatsapp.group.updated` event.
      operationId: setWhatsAppGroupPhoto
      parameters:
        - name: ch
          in: path
          required: true
          schema:
            type: string
          description: ch_ channel id
        - $ref: '#/components/parameters/WhatsAppGroupId'
        - $ref: '#/components/parameters/IdempotencyKey'
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              additionalProperties: false
              required:
                - file
              properties:
                file:
                  type: string
                  format: binary
                  description: JPEG, square, at least 192 px, up to 5 MB
      responses:
        '202':
          description: Accepted
          headers:
            Idempotent-Replayed:
              $ref: '#/components/headers/IdempotentReplayed'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WhatsAppGroupRequestResult'
        '400':
          $ref: '#/components/responses/Error'
        '401':
          $ref: '#/components/responses/Error'
        '403':
          $ref: '#/components/responses/Error'
        '404':
          $ref: '#/components/responses/Error'
        '409':
          $ref: '#/components/responses/Error'
        '429':
          $ref: '#/components/responses/RateLimited'
        '500':
          $ref: '#/components/responses/Error'
components:
  parameters:
    WhatsAppGroupId:
      name: groupId
      in: path
      required: true
      schema:
        type: string
        pattern: ^(?!\d+$)[A-Za-z0-9+=_-]{1,256}$
      description: >-
        WhatsApp group id, as returned by the list and by
        `whatsapp.group.updated` events.
    IdempotencyKey:
      name: Idempotency-Key
      in: header
      required: false
      schema:
        type: string
        pattern: ^[\x21-\x7E]{1,255}$
      description: >
        Optional. Send the same key when retrying the same request: a completed
        request is replayed

        (same status and body, `Idempotent-Replayed: true`) instead of running
        twice. Keys are scoped to

        your organization for 24 hours. `409 IDEMPOTENCY_KEY_REUSED`: the key
        was used for a different

        request. `409 IDEMPOTENCY_IN_PROGRESS`: the first request is still
        running. `409

        IDEMPOTENCY_OUTCOME_UNKNOWN`: the first attempt may have reached the
        channel; check it before

        retrying with a new key. Without the header, delivery is at-least-once.
  headers:
    IdempotentReplayed:
      description: >-
        `true` when this response replays an earlier request with the same
        `Idempotency-Key`.
      schema:
        type: boolean
  schemas:
    WhatsAppGroupRequestResult:
      type: object
      additionalProperties: false
      required:
        - channelId
        - requestId
      properties:
        channelId:
          type: string
        requestId:
          type:
            - string
            - 'null'
          description: >-
            Matches the `requestId` on the `whatsapp.group.updated` event that
            reports the outcome
    Error:
      type: object
      properties:
        statusCode:
          type: integer
          example: 403
          description: HTTP status code
          mirrors the response status: null
        code:
          type: string
          description: Stable machine-readable code, e.g. `AGENT_SCOPE_INSUFFICIENT`
        message:
          type: string
        requestId:
          type: string
          description: Include this when contacting support about the request
  responses:
    Error:
      description: Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    RateLimited:
      description: Rate limited
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: '`Authorization: Bearer hmok_...` API key or a dashboard session token'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.