> ## 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

> <Info>This API is in beta. Endpoints, fields, and behavior may still change, so avoid depending on it in production.</Info>

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. A read-only key is refused, and workspace API keys are not accepted.</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: >-
        <Info>This API is in beta. Endpoints, fields, and behavior may still
        change, so avoid depending on it in production.</Info>


        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. A read-only key is refused, and workspace API
        keys are not accepted.</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.
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.'
  securitySchemes:
    PersonalAccessTokenAuth:
      type: http
      scheme: bearer
      description: 'Personal access token, sent as `Authorization: Bearer <token>`.'

````