Documentation Version
Summer '15 (API version 34.0)
  • Summer '15 (API version 34.0) 34.0
  • Spring '15 (API version 33.0) 33.0
  • Winter '15 (API version 32.0) 32.0
  • Summer '14 (API version 31.0) 31.0
  • Spring '14 (API version 30.0) 30.0
  • Winter '14 (API version 29.0) 29.0
  • English
  • Japanese

Status Codes and Error Responses

Either when an error occurs or when a response is successful, the response header contains an HTTP code, and the response body usually contains:
  • The HTTP response code
  • The message accompanying the HTTP response code
  • The field or object where the error occurred (if the response returns information about an error)
HTTP response code Description
200 “OK” success code, for GET or HEAD request.
201 “Created” success code, for POST request.
204 “No Content” success code, for DELETE request.
300 The value returned when an external ID exists in more than one record. The response body contains the list of matching records.
304 The request content has not changed since a specified date and time. The date and time is provided in a If-Modified-Since header. See Get Object Metadata Changes for an example.
400 The request couldn’t be understood, usually because the JSON or XML body contains an error.
401 The session ID or OAuth token used has expired or is invalid. The response body contains the message and errorCode.
403 The request has been refused. Verify that the logged-in user has appropriate permissions.
404 The requested resource couldn’t be found. Check the URI for errors, and verify that there are no sharing issues.
405 The method specified in the Request-Line isn’t allowed for the resource specified in the URI.
415 The entity in the request is in a format that’s not supported by the specified method.
500 An error has occurred within, so the request couldn’t be completed. Contact Salesforce Customer Support.
Incorrect ID example
Using a non-existent ID in a request using JSON or XML (request_body.json or request_body.xml)
  "fields" : [ "Id" ],
  "message" : "Account ID: id value of incorrect type: 001900K0001pPuOAAU",
  "errorCode" : "MALFORMED_ID"
Resource does not exist
Requesting a resource that doesn’t exist, for example, if you try to create a record using a misspelled object name
  "message" : "The requested resource does not exist",
  "errorCode" : "NOT_FOUND"