Salesforce Photo API

The Photo API from Salesforce — 2 operation(s) for photo.

Operations 1

POST /data/v64.0/connect/user-profiles/me/photo Salesforce User Photo #

Documentation

Specifications

Schemas & Data

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/salesforce-photo-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no email required.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

salesforce-photo-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Salesforce Photo API
  description: 'Find the resources you need to start building. '
  contact: {}
  version: '1.0'
servers:
- url: https://login.salesforce.com
  variables: {}
- url: https://id
  variables: {}
- url: https://services
  variables: {}
- url: '{{url}}{{site}}/services/oauth2'
  variables:
    url:
      default: DefaultParameterValue
    site:
      default: DefaultParameterValue
security:
- oauth2:
  - api
tags:
- name: Photo
paths:
  /data/v64.0/connect/user-profiles/me/photo:
    parameters: []
    post:
      tags:
      - Photo
      summary: Salesforce User Photo
      description: 'Get, post, and crop a user photo.

        To use an image from the Files page as a user photo, pass the file ID in the fileId property of the request body or in the fileId request parameter. Images uploaded on the User page don’t have a file ID and can’t be used as the fileId.


        To upload a binary file as the user photo, you must send it in a multipart/form-data message. For information about how to create the multipart/form-data message, see Uploading Binary Files.


        To display user profile photos in a feed, cache the user photos. Then use the photoVersionId property of the Photo response body to determine when you need to update a photo. This technique helps you avoid running over limits and may improve mobile client performance.'
      operationId: UserPhoto
      parameters: []
      requestBody:
        content:
          multipart/form-data:
            encoding: {}
            schema:
              required:
              - json
              - fileUpload
              type: object
              properties:
                json:
                  allOf:
                  - $ref: '#/components/schemas/json'
                  - examples:
                    - cropY: '0'
                      cropX: '0'
                      cropSize: '200'
                fileUpload:
                  type: string
                  contentEncoding: base64
              contentMediaType: multipart/form-data
            examples:
              UserphotoRequestExample:
                summary: Default UserPhoto request
                x-microcks-default: true
                value:
                  json: example_value
                  fileUpload: example_value
        required: false
      responses:
        '201':
          description: Created
          headers:
            Date:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Mon, 20 Nov 2023 16:15:44 GMT
            Strict-Transport-Security:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: max-age=63072000; includeSubDomains
            X-Content-Type-Options:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: nosniff
            X-XSS-Protection:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: 1; mode=block
            X-Robots-Tag:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: none
            Cache-Control:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: no-cache,must-revalidate,max-age=0,no-store,private
            Vary:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: Accept-Encoding
            Content-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: gzip
            Transfer-Encoding:
              content:
                text/plain:
                  schema:
                    type: string
                    contentMediaType: text/plain
                  example: chunked
          content:
            application/json;charset=UTF-8:
              schema:
                allOf:
                - $ref: '#/components/schemas/SuccesfulUserPhoto'
                - examples:
                  - fullEmailPhotoUrl: https://<my_domain>/img/userprofile/default_profile_200_v2.png?fromEmail=1
                    largePhotoUrl: https://<my_domain>/profilephoto/729.../F
                    mediumPhotoUrl: https://<my_domain>/profilephoto/729.../M
                    photoVersionId: 729...
                    smallPhotoUrl: https://<my_domain>/profilephoto/729.../T
                    standardEmailPhotoUrl: https://<my_domain>/img/userprofile/default_profile_45_v2.png?fromEmail=1
                    url: /services/data/v58.0/connect/user-profiles/005.../photo
                contentMediaType: application/json;charset=UTF-8
              example:
                fullEmailPhotoUrl: https://<my_domain>/img/userprofile/default_profile_200_v2.png?fromEmail=1
                largePhotoUrl: https://<my_domain>/profilephoto/729.../F
                mediumPhotoUrl: https://<my_domain>/profilephoto/729.../M
                photoVersionId: 729...
                smallPhotoUrl: https://<my_domain>/profilephoto/729.../T
                standardEmailPhotoUrl: https://<my_domain>/img/userprofile/default_profile_45_v2.png?fromEmail=1
                url: /services/data/v58.0/connect/user-profiles/005.../photo
      deprecated: false
      servers:
      - url: https://services
        variables: {}
      x-api-evangelist-processing:
        PascalCaseOperationSummaries: true
        ChooseTags: true
      x-microcks-operation:
        delay: 0
        dispatcher: FALLBACK
components:
  schemas:
    SuccesfulUserPhoto:
      title: SuccesfulUserPhoto
      required:
      - fullEmailPhotoUrl
      - largePhotoUrl
      - mediumPhotoUrl
      - photoVersionId
      - smallPhotoUrl
      - standardEmailPhotoUrl
      - url
      type: object
      properties:
        fullEmailPhotoUrl:
          type: string
          example: user@example.com
        largePhotoUrl:
          type: string
          example: https://www.example.com
        mediumPhotoUrl:
          type: string
          example: https://www.example.com
        photoVersionId:
          type: string
          example: '500123'
        smallPhotoUrl:
          type: string
          example: https://www.example.com
        standardEmailPhotoUrl:
          type: string
          example: user@example.com
        url:
          type: string
          example: https://www.example.com
      examples:
      - fullEmailPhotoUrl: https://<my_domain>/img/userprofile/default_profile_200_v2.png?fromEmail=1
        largePhotoUrl: https://<my_domain>/profilephoto/729.../F
        mediumPhotoUrl: https://<my_domain>/profilephoto/729.../M
        photoVersionId: 729...
        smallPhotoUrl: https://<my_domain>/profilephoto/729.../T
        standardEmailPhotoUrl: https://<my_domain>/img/userprofile/default_profile_45_v2.png?fromEmail=1
        url: /services/data/v58.0/connect/user-profiles/005.../photo
    json:
      title: json
      required:
      - cropY
      - cropX
      - cropSize
      type: object
      properties:
        cropY:
          type: string
          example: example_value
        cropX:
          type: string
          example: example_value
        cropSize:
          type: string
          example: example_value
      examples:
      - cropY: '0'
        cropX: '0'
        cropSize: '200'
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: '{DefaultParameterValue}{DefaultParameterValue}/services/oauth2/authorize'
          scopes:
            api: ''