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

# Set social image

> Sets the image shown when someone shares a link to the app, or removes it.

Send an `https` URL, such as the public link from [Upload app file](/api-reference/upload-app-file), or `null` to remove the image. Leaving `social_image_url` out also removes it. The URL isn't fetched or checked. The published app picks up the change within moments, without a new deploy. A preview image set for a specific page takes precedence on that page, and without a social image, link previews fall back to the app's logo.

<Note>This endpoint accepts a personal API key belonging to a user with editor access to the app, or a workspace API key, which acts as the workspace owner. A read-only key is refused.</Note>

<Warning>The response includes fields beyond the ones documented here. Don't rely on undocumented response fields, as they can change at any time. Send only the fields documented here. Other request fields are not supported and their behavior can change.</Warning>



## OpenAPI

````yaml /developers/references/app-management/app-management-openapi.json post /api/apps/{app_id}/metadata/social-image
openapi: 3.1.0
info:
  title: Base44 App Management API
  version: 1.0.0
servers:
  - url: https://app.base44.com
security:
  - PersonalAccessTokenAuth: []
paths:
  /api/apps/{app_id}/metadata/social-image:
    post:
      summary: Set social image
      description: >-
        Sets the image shown when someone shares a link to the app, or removes
        it.


        Send an `https` URL, such as the public link from [Upload app
        file](/api-reference/upload-app-file), or `null` to remove the image.
        Leaving `social_image_url` out also removes it. The URL isn't fetched or
        checked. The published app picks up the change within moments, without a
        new deploy. A preview image set for a specific page takes precedence on
        that page, and without a social image, link previews fall back to the
        app's logo.


        <Note>This endpoint accepts a personal API key belonging to a user with
        editor access to the app, or a workspace API key, which acts as the
        workspace owner. A read-only key is refused.</Note>


        <Warning>The response includes fields beyond the ones documented here.
        Don't rely on undocumented response fields, as they can change at any
        time. Send only the fields documented here. Other request fields are not
        supported and their behavior can change.</Warning>
      operationId: update_social_image_api_apps__app_id__metadata_social_image_post
      parameters:
        - name: app_id
          in: path
          required: true
          schema:
            type: string
            description: ID of the app to set the social image on.
            title: App Id
          description: ID of the app to set the social image on.
          example: 6820f3a4e7b91d003c45a1f2
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SocialImagePayload'
      responses:
        '200':
          description: The app with its new social image.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AppSocialImage'
        '401':
          description: Missing or invalid credentials.
        '403':
          description: >-
            You don't have editor access to this app, or your API key is
            read-only.
        '404':
          description: App not found.
        '422':
          description: >-
            `social_image_url` isn't an `https` URL, or it's longer than 2048
            characters.
        '503':
          description: >-
            Database temporarily unavailable (`database_unavailable`): the data
            cluster did not answer in time. Retry after the `Retry-After`
            seconds.
          headers:
            Retry-After:
              description: Seconds to wait before retrying.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/StandardErrorEnvelope'
              examples:
                database_unavailable:
                  summary: database_unavailable
                  value:
                    error:
                      code: database_unavailable
                      message: Database temporarily unavailable, please retry
                      details: {}
      security:
        - PersonalAccessTokenAuth:
            - full_access
        - WorkspaceApiKeyAuth:
            - full_access
        - WorkspaceApiKeyBearerAuth:
            - full_access
components:
  schemas:
    SocialImagePayload:
      properties:
        social_image_url:
          anyOf:
            - type: string
              maxLength: 2048
            - type: 'null'
          title: Social Image Url
          description: >-
            `https` URL of the image to show in link previews, up to 2048
            characters, or `null` to remove the current one. Leaving it out also
            removes it.
          example: >-
            https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png
      type: object
      title: SocialImagePayload
    AppSocialImage:
      properties:
        id:
          type: string
          title: Id
          description: ID of the app.
          example: 6820f3a4e7b91d003c45a1f2
        social_image_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Social Image Url
          description: >-
            URL of the image shown when someone shares the app's link, or `null`
            when you removed it.
          example: >-
            https://storage.base44.com/6820f3a4e7b91d003c45a1f2/7c1e9f2a_share.png
      type: object
      required:
        - id
        - social_image_url
      title: AppSocialImage
      description: 'Doc-only: the handler returns the whole app document.'
    StandardErrorEnvelope:
      properties:
        error:
          $ref: '#/components/schemas/StandardError'
          description: What went wrong.
      type: object
      required:
        - error
      title: StandardErrorEnvelope
      description: The error body returned in the standard envelope.
    StandardError:
      properties:
        code:
          type: string
          title: Code
          description: >-
            Stable machine-readable cause of the failure. Match on this, not on
            `message`.
          example: not_found
        message:
          type: string
          title: Message
          description: Human-readable explanation. It isn't a stable contract.
          example: App not found
        details:
          additionalProperties: true
          type: object
          title: Details
          description: >-
            Structured context for the failure, or an empty object when there's
            none.
          example: {}
      type: object
      required:
        - code
        - message
      title: StandardError
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: >-
        Personal access token, sent as `Authorization: Bearer <token>`. Each
        operation lists the permission it needs: `read_only` or `full_access`. A
        full-access token can call every operation. A read-only token can call
        only the operations that list `read_only`; anything else returns 403
        `read_only_credential_route_not_allowed`.
    WorkspaceApiKeyAuth:
      type: apiKey
      in: header
      name: api_key
      description: >-
        Workspace API key, sent as `api_key: <key>`. Each operation that accepts
        one lists what the key needs: a permission, `read_only` or
        `full_access`, like a personal access token, or a scope. A key without
        the scope gets 403 `workspace_api_key_scope_required`.
    WorkspaceApiKeyBearerAuth:
      type: http
      scheme: bearer
      description: >-
        Workspace API key, sent as `Authorization: Bearer <key>`. Accepted
        wherever `api_key` is, with the same permission.

````

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