Request

Response

    API Basics

    Here is the basic information needed to get started on the User Profile GraphQL API.

    Endpoints

    All User Profile GraphQL API queries/mutations are under the following endpoints:

    Modern APS Endpoint (Recommended):

    POST https://api.aps.autodesk.com/unifieduserprofile
    

    Legacy Endpoint (Still Supported):

    POST https://developer.api.autodesk.com/unifieduserprofile
    

    Note: We recommend using the modern APS endpoints for all new integrations. Both endpoints are functionally equivalent and will continue to be supported.

    For detailed endpoint information including code examples in multiple languages, see POST /unifieduserprofile.

    Headers

    HeaderRequiredDescription
    Authorization Required It is required for all the calls to User Profile API
    x-correlation-id Optional This header can be used to uniquely identify the request on Profile team's side.
    Content-Type Required Set value as application/json

    Authorization & Scopes

    All calls to the User Profile API require a bearer token with the appropriate custom OAuth scopes. Custom scopes use the profapi: prefix and provide fine-grained control over which profile data your application can read or write.

    Use Two-Legged OAuth (2LO) for server-to-server GraphQL calls from your backend. Use Three-Legged OAuth (3LO) for browser or user-facing flows. 2LO tokens must not be used from browser or web-property traffic on GraphQL Profile — affected requests return HTTP 403. See Authentication Patterns for BFF guidance and migration options.

    For example, to read core profile fields, your token must include either profapi:core-std-profile:read (for a standard subset of fields) or profapi:core-all-profile:read (for all core fields). To read profile images in the same query, add profapi:img-profile:read.

    For a complete list of available scopes, field-level access details, and examples, see Custom Scopes.

    Requests

    All GraphQL requests are HTTP POST requests. The request body is a JSON object with two components:

    • query (required): The GraphQL query or mutation string, which includes the fields requested from the API
    • variables (optional): An object containing values for variables used in the query

    Note: The variables component must be passed as a JSON object, not as a JSON-encoded string.

    API tools can fetch the GraphQL schema and provide autocomplete for field names while you construct your queries.

    Queries

    A query request body has the following structure:

    {
      "query": "
        query GetUserProfile($filter: UserProfileInput!) {
          userProfile(filter: $filter) {
            userId
            personalInfo {
              primaryEmail
              basicInfo {
                firstName
                lastName
              }
            }
          }
        }
      ",
      "variables": {
        "filter": {
          "id": "<USER_ID>"
        }
      }
    }
    
    Show More

    Note: The query string above is shown with line breaks for readability. In actual JSON, use \n escape sequences or your programming language’s multi-line string syntax.

    For reference, here are the query and variables portions separately:

    Query:

    query GetUserProfile($filter: UserProfileInput!) {
      userProfile(filter: $filter) {
        userId
        personalInfo {
          primaryEmail
          basicInfo {
            firstName
            lastName
          }
        }
      }
    }
    
    Show More

    Variables:

    {
      "filter": {
        "id": "<USER_ID>"
      }
    }
    

    query GetUserProfile($filter: UserProfileInput!): GetUserProfile is the optional operation name given by the client. As per GraphQL standards, operation names, fields, and arguments should use camelCase.

    userProfile(filter: $filter): userProfile is the root query field as defined in the GraphQL schema. $filter is an input object argument passed to this field.

    filter.id: Input field that is part of the $filter input object.

    userId, personalInfo, basicInfo, firstName, lastName: Fields that are part of the response object. An error is thrown if an invalid field is requested.

    While providing an operation name is optional, it is strongly recommended for debugging and logging purposes.

    Mutations

    A mutation request body has the following structure:

    {
      "query": "
        mutation UpdateUserProfile($input: UpdateUserProfileInput!) {
          updateUserProfileV2(input: $input) {
            userId
            personalInfo {
              basicInfo {
                firstName
              }
              professionalInfo {
                aboutMe
              }
            }
          }
        }
      ",
      "variables": {
        "input": {
          "id": "<USER_ID>",
          "firstName": "UpdatedFirstName",
          "professionalInfo": {
            "aboutMe": "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
          }
        }
      }
    }
    
    Show More

    For reference, here are the query and variables portions separately:

    Mutation:

    mutation UpdateUserProfile($input: UpdateUserProfileInput!) {
      updateUserProfileV2(input: $input) {
        userId
        personalInfo {
          basicInfo {
            firstName
          }
          professionalInfo {
            aboutMe
          }
        }
      }
    }
    
    Show More

    Variables:

    {
      "input": {
        "id": "<USER_ID>",
        "firstName": "UpdatedFirstName",
        "professionalInfo": {
          "aboutMe": "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
        }
      }
    }
    
    Show More

    mutation UpdateUserProfile($input: UpdateUserProfileInput!): UpdateUserProfile is the optional operation name given by the client.

    updateUserProfileV2(input: $input): updateUserProfileV2 is the mutation field as defined in the GraphQL schema. $input is an input object argument passed to this field.

    input.id, input.firstName, input.professionalInfo.aboutMe: Input fields that are part of the $input input object.

    userId, basicInfo.firstName, professionalInfo.aboutMe: Fields that are part of the response object. An error is thrown if an invalid field is requested.

    Response

    Successful responses for both queries and mutations follow the same JSON structure:

    {
      "data": {
        "userProfile": {
          "userId": "testId",
          "personalInfo": {
            "basicInfo": {
              "firstName": "test"
            },
            "professionalInfo": {
              "aboutMe": "Lorem ipsum dolor sit amet, consectetur adipiscing elit."
            }
          }
        }
      }
    }
    
    Show More

    Only the requested fields are returned in the response.

    Errors

    All GraphQL error responses return a 200 OK HTTP status code, even if these responses contain errors. Moreover, errors in nested queries don’t have to fail the whole query, allowing for “partial responses”.

    For more information, see: