Headers

REST API supports several standard and custom HTTP headers, including both request headers and response headers.

  • Assignment Rule Header

    The Assignment Rule header is a request header applied when creating or updating Accounts, Cases, or Leads. If enabled, the active assignment rules are used. If disabled, the active assignment rules are not applied. If a valid AssignmentRule ID is provided, the AssignmentRule is applied. If the header is not provided with a request, REST API defaults to using the active assignment rules.

  • Call Options Header

    Specifies options for the client you’re using to access REST API resources. For example, you can provide a default namespace prefix so that you don’t need to specify the prefix in your code.

  • Compression Headers

    Use a compression header to compress a REST API request or response. Compression reduces the bandwidth required for a request, although it requires more processing power at your client. In most cases, this tradeoff benefits the overall performance of your application.

  • Conditional Request Headers

    Use a conditional request header to validate resources before accessing them. By setting a precondition in the header, you ensure that your request succeeds only if that precondition is met. This functionality helps you prevent mistakes and reject outdated requests when updating Salesforce data. You can implement a variety of techniques with conditional request headers, such as response caching.

  • Duplicate Rule Header

    Configure options for duplicate rules. Salesforce uses duplicate rules to see if the record that is being created, updated, or upserted is a duplicate of an existing record. Duplicate rules are part of Duplicate Management.

  • Limit Info Header

    This response header is returned in each request to REST API (except for calls to the Versions URI, /, which do not count towards your org’s limit). You can use the information to monitor API limits.

  • MRU Header

    Defines if the record that is created, updated, upserted, or retrieved updates the list of most recently used (MRU) items. MRU items are shown in the Recent Items section of the sidebar in the Salesforce user interface. This header is available in API version 60.0 and later.

  • Package Version Header

    Specifies the version of each package referenced by a client. A package version is a number that identifies the set of components and behavior contained in a package. This header can also be used to specify a package version when making calls to an Apex REST web service.

  • Query Options Header

    Specifies options used in a query, such as the query results batch size. Use this request header with the Query resource.

  • Warning Header

    This header is returned if there are warnings, such as the use of a deprecated version of the API.