Salesforce REST v66.0 — standard CRM object core

This reference is readable without JavaScript. Download the OpenAPI document.

Runtime

/api/purple-suite/{instanceId}/contracts/crm/salesforce
[
  {
    "method": "post",
    "path": "/services/data/v66.0/sobjects/Account",
    "operationId": "createAccount"
  },
  {
    "method": "get",
    "path": "/services/data/v66.0/sobjects/Account/:recordId",
    "operationId": "retrieveAccount"
  },
  {
    "method": "patch",
    "path": "/services/data/v66.0/sobjects/Account/:recordId",
    "operationId": "updateAccount"
  },
  {
    "method": "delete",
    "path": "/services/data/v66.0/sobjects/Account/:recordId",
    "operationId": "deleteAccount"
  },
  {
    "method": "post",
    "path": "/services/data/v66.0/sobjects/Contact",
    "operationId": "createContact"
  },
  {
    "method": "get",
    "path": "/services/data/v66.0/sobjects/Contact/:recordId",
    "operationId": "retrieveContact"
  },
  {
    "method": "patch",
    "path": "/services/data/v66.0/sobjects/Contact/:recordId",
    "operationId": "updateContact"
  },
  {
    "method": "delete",
    "path": "/services/data/v66.0/sobjects/Contact/:recordId",
    "operationId": "deleteContact"
  },
  {
    "method": "post",
    "path": "/services/data/v66.0/sobjects/Lead",
    "operationId": "createLead"
  },
  {
    "method": "get",
    "path": "/services/data/v66.0/sobjects/Lead/:recordId",
    "operationId": "retrieveLead"
  },
  {
    "method": "patch",
    "path": "/services/data/v66.0/sobjects/Lead/:recordId",
    "operationId": "updateLead"
  },
  {
    "method": "delete",
    "path": "/services/data/v66.0/sobjects/Lead/:recordId",
    "operationId": "deleteLead"
  },
  {
    "method": "post",
    "path": "/services/data/v66.0/sobjects/Opportunity",
    "operationId": "createOpportunity"
  },
  {
    "method": "get",
    "path": "/services/data/v66.0/sobjects/Opportunity/:recordId",
    "operationId": "retrieveOpportunity"
  },
  {
    "method": "patch",
    "path": "/services/data/v66.0/sobjects/Opportunity/:recordId",
    "operationId": "updateOpportunity"
  },
  {
    "method": "delete",
    "path": "/services/data/v66.0/sobjects/Opportunity/:recordId",
    "operationId": "deleteOpportunity"
  },
  {
    "method": "get",
    "path": "/services/data/v66.0/query",
    "operationId": "query"
  },
  {
    "method": "get",
    "path": "/services/data/v66.0/query/:queryLocator",
    "operationId": "queryMore"
  }
]

Credentials

Coverage and limitations

{
  "documentScope": "bounded",
  "runtimeFidelity": "modeled",
  "counts": {
    "operations": 18,
    "types": 4
  },
  "notes": [
    "Selected standard fields, limited SOQL and JSON transport only; no full org/tenant parity claim. See README.md and complete acquired SOURCE_INVENTORY.md.",
    "Persistent transactional CRUD, references, account deletion cascade and snapshot paging. Separate local budgets: 512 KiB records and 256 KiB query snapshots. No customer differential fixtures captured.",
    "Native origin-relative attributes.url and nextRecordsUrl remain unchanged; the isolated client follows only validated vendor paths beneath its configured contract prefix."
  ]
}

Bounded modeled API 66.0 core: 18 operations, four standard objects, selected published fields and an explicit SOQL grammar. Public reference-derived contract, not an org-generated schema. No custom fields, describe metadata, lead conversion, products, OAuth issuance, automation, sharing rules or arbitrary Salesforce org compatibility.

Servers

[
  {
    "url": "/api/purple-suite/{instanceId}/contracts/crm/salesforce",
    "variables": {
      "instanceId": {
        "default": "INSTANCE_ID"
      }
    }
  }
]

Authentication schemes

{
  "bearer": {
    "type": "http",
    "scheme": "bearer"
  }
}

Each operation lists its security requirements. An empty security array permits an unauthenticated request. Use the scheme and headers declared for the selected contract.

Operations

POST /services/data/v66.0/sobjects/Account

createAccount

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "createAccount",
  "tags": [
    "Account"
  ],
  "summary": "createAccount",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AccountCreate"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CreateResult"
          }
        }
      }
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

GET /services/data/v66.0/sobjects/Account/{recordId}

retrieveAccount

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "retrieveAccount",
  "tags": [
    "Account"
  ],
  "summary": "retrieveAccount",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "recordId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$"
      }
    },
    {
      "name": "fields",
      "in": "query",
      "schema": {
        "type": "string"
      },
      "description": "Comma-separated fields from the modeled Account schema."
    },
    {
      "name": "If-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-None-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-Modified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    },
    {
      "name": "If-Unmodified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Account"
          }
        }
      }
    },
    "304": {
      "description": "Not modified"
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

PATCH /services/data/v66.0/sobjects/Account/{recordId}

updateAccount

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "updateAccount",
  "tags": [
    "Account"
  ],
  "summary": "updateAccount",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "recordId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$"
      }
    },
    {
      "name": "If-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-None-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-Modified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    },
    {
      "name": "If-Unmodified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/AccountUpdate"
        }
      }
    }
  },
  "responses": {
    "204": {
      "description": "No content"
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

DELETE /services/data/v66.0/sobjects/Account/{recordId}

deleteAccount

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "deleteAccount",
  "tags": [
    "Account"
  ],
  "summary": "deleteAccount",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "recordId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$"
      }
    },
    {
      "name": "If-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-None-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-Modified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    },
    {
      "name": "If-Unmodified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    }
  ],
  "responses": {
    "204": {
      "description": "No content"
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

POST /services/data/v66.0/sobjects/Contact

createContact

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "createContact",
  "tags": [
    "Contact"
  ],
  "summary": "createContact",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ContactCreate"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CreateResult"
          }
        }
      }
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

GET /services/data/v66.0/sobjects/Contact/{recordId}

retrieveContact

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "retrieveContact",
  "tags": [
    "Contact"
  ],
  "summary": "retrieveContact",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "recordId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$"
      }
    },
    {
      "name": "fields",
      "in": "query",
      "schema": {
        "type": "string"
      },
      "description": "Comma-separated fields from the modeled Contact schema."
    },
    {
      "name": "If-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-None-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-Modified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    },
    {
      "name": "If-Unmodified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Contact"
          }
        }
      }
    },
    "304": {
      "description": "Not modified"
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

PATCH /services/data/v66.0/sobjects/Contact/{recordId}

updateContact

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "updateContact",
  "tags": [
    "Contact"
  ],
  "summary": "updateContact",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "recordId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$"
      }
    },
    {
      "name": "If-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-None-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-Modified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    },
    {
      "name": "If-Unmodified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/ContactUpdate"
        }
      }
    }
  },
  "responses": {
    "204": {
      "description": "No content"
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

DELETE /services/data/v66.0/sobjects/Contact/{recordId}

deleteContact

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "deleteContact",
  "tags": [
    "Contact"
  ],
  "summary": "deleteContact",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "recordId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$"
      }
    },
    {
      "name": "If-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-None-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-Modified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    },
    {
      "name": "If-Unmodified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    }
  ],
  "responses": {
    "204": {
      "description": "No content"
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

POST /services/data/v66.0/sobjects/Lead

createLead

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "createLead",
  "tags": [
    "Lead"
  ],
  "summary": "createLead",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/LeadCreate"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CreateResult"
          }
        }
      }
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

GET /services/data/v66.0/sobjects/Lead/{recordId}

retrieveLead

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "retrieveLead",
  "tags": [
    "Lead"
  ],
  "summary": "retrieveLead",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "recordId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$"
      }
    },
    {
      "name": "fields",
      "in": "query",
      "schema": {
        "type": "string"
      },
      "description": "Comma-separated fields from the modeled Lead schema."
    },
    {
      "name": "If-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-None-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-Modified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    },
    {
      "name": "If-Unmodified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Lead"
          }
        }
      }
    },
    "304": {
      "description": "Not modified"
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

PATCH /services/data/v66.0/sobjects/Lead/{recordId}

updateLead

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "updateLead",
  "tags": [
    "Lead"
  ],
  "summary": "updateLead",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "recordId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$"
      }
    },
    {
      "name": "If-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-None-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-Modified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    },
    {
      "name": "If-Unmodified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/LeadUpdate"
        }
      }
    }
  },
  "responses": {
    "204": {
      "description": "No content"
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

DELETE /services/data/v66.0/sobjects/Lead/{recordId}

deleteLead

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "deleteLead",
  "tags": [
    "Lead"
  ],
  "summary": "deleteLead",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "recordId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$"
      }
    },
    {
      "name": "If-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-None-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-Modified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    },
    {
      "name": "If-Unmodified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    }
  ],
  "responses": {
    "204": {
      "description": "No content"
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

POST /services/data/v66.0/sobjects/Opportunity

createOpportunity

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "createOpportunity",
  "tags": [
    "Opportunity"
  ],
  "summary": "createOpportunity",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/OpportunityCreate"
        }
      }
    }
  },
  "responses": {
    "201": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/CreateResult"
          }
        }
      }
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

GET /services/data/v66.0/sobjects/Opportunity/{recordId}

retrieveOpportunity

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "retrieveOpportunity",
  "tags": [
    "Opportunity"
  ],
  "summary": "retrieveOpportunity",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "recordId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$"
      }
    },
    {
      "name": "fields",
      "in": "query",
      "schema": {
        "type": "string"
      },
      "description": "Comma-separated fields from the modeled Opportunity schema."
    },
    {
      "name": "If-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-None-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-Modified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    },
    {
      "name": "If-Unmodified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Opportunity"
          }
        }
      }
    },
    "304": {
      "description": "Not modified"
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

PATCH /services/data/v66.0/sobjects/Opportunity/{recordId}

updateOpportunity

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "updateOpportunity",
  "tags": [
    "Opportunity"
  ],
  "summary": "updateOpportunity",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "recordId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$"
      }
    },
    {
      "name": "If-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-None-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-Modified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    },
    {
      "name": "If-Unmodified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    }
  ],
  "requestBody": {
    "required": true,
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/OpportunityUpdate"
        }
      }
    }
  },
  "responses": {
    "204": {
      "description": "No content"
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

DELETE /services/data/v66.0/sobjects/Opportunity/{recordId}

deleteOpportunity

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "deleteOpportunity",
  "tags": [
    "Opportunity"
  ],
  "summary": "deleteOpportunity",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "recordId",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string",
        "pattern": "^[A-Za-z0-9]{15}([A-Za-z0-9]{3})?$"
      }
    },
    {
      "name": "If-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-None-Match",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "ETag precondition for Account records."
    },
    {
      "name": "If-Modified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    },
    {
      "name": "If-Unmodified-Since",
      "in": "header",
      "schema": {
        "type": "string"
      },
      "description": "HTTP-date precondition."
    }
  ],
  "responses": {
    "204": {
      "description": "No content"
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

GET /services/data/v66.0/query

query

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "query",
  "tags": [
    "Query"
  ],
  "summary": "query",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "q",
      "in": "query",
      "required": true,
      "schema": {
        "type": "string"
      },
      "description": "SELECT fields FROM Account|Contact|Lead|Opportunity [WHERE field op literal [AND ...]] [ORDER BY field [ASC|DESC]] [LIMIT n] [OFFSET n]. Supported comparisons: =, !=, <, <=, >, >=, LIKE. Id and AccountId support = and != with 15/18-character IDs or null. Quoted strings decode documented SOQL escapes; wildcard escapes are LIKE-only. Dates must be unquoted real calendar days from 1700-01-01 through 4000-12-31 on date fields only. Non-null date-time comparisons are unsupported. Description is selectable/writable but not filterable/sortable; IsDeleted is not sortable. At most 10 AND conditions, 256 characters per LIKE pattern, 100000 query characters, OFFSET <= 2000. Local LIKE evaluation budget: 20 million character-pattern steps. No relationships, aggregates, subqueries, functions, OR, custom fields or arbitrary SOQL extensions."
    },
    {
      "name": "Sforce-Query-Options",
      "in": "header",
      "schema": {
        "type": "string",
        "pattern": "^batchSize=(?:[2-9][0-9]{2}|1[0-9]{3}|2000)$"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/QueryResult"
          }
        }
      }
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

GET /services/data/v66.0/query/{queryLocator}

queryMore

Authentication

[
  {
    "bearer": []
  }
]

Request, responses and operation details

{
  "operationId": "queryMore",
  "tags": [
    "Query"
  ],
  "summary": "queryMore",
  "security": [
    {
      "bearer": []
    }
  ],
  "parameters": [
    {
      "name": "queryLocator",
      "in": "path",
      "required": true,
      "schema": {
        "type": "string"
      }
    }
  ],
  "responses": {
    "200": {
      "description": "Success",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/QueryResult"
          }
        }
      }
    },
    "400": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "401": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "403": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "404": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "412": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "415": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    },
    "500": {
      "description": "Salesforce error array",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/Error"
          }
        }
      }
    }
  }
}

Schemas and reusable components

securitySchemes

bearer

{
  "type": "http",
  "scheme": "bearer"
}

schemas

Error

{
  "type": "array",
  "items": {
    "type": "object",
    "additionalProperties": false,
    "required": [
      "message",
      "errorCode"
    ],
    "properties": {
      "message": {
        "type": "string"
      },
      "errorCode": {
        "type": "string"
      },
      "fields": {
        "type": "array",
        "items": {
          "type": "string"
        }
      }
    }
  }
}

CreateResult

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "success",
    "errors"
  ],
  "properties": {
    "id": {
      "type": "string",
      "pattern": "^[A-Za-z0-9]{18}$"
    },
    "success": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "errors": {
      "type": "array",
      "maxItems": 0,
      "items": {
        "type": "object"
      }
    }
  }
}

AccountCreate

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "Name"
  ],
  "properties": {
    "Name": {
      "type": "string",
      "maxLength": 255
    },
    "Phone": {
      "type": "string",
      "maxLength": 40,
      "nullable": true
    },
    "Website": {
      "type": "string",
      "maxLength": 255,
      "nullable": true
    },
    "Description": {
      "type": "string",
      "maxLength": 32000,
      "nullable": true
    }
  }
}

AccountUpdate

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "Name": {
      "type": "string",
      "maxLength": 255
    },
    "Phone": {
      "type": "string",
      "maxLength": 40,
      "nullable": true
    },
    "Website": {
      "type": "string",
      "maxLength": 255,
      "nullable": true
    },
    "Description": {
      "type": "string",
      "maxLength": 32000,
      "nullable": true
    }
  }
}

Account

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "attributes"
  ],
  "properties": {
    "Id": {
      "type": "string",
      "maxLength": 18
    },
    "CreatedDate": {
      "type": "string",
      "format": "date-time"
    },
    "LastModifiedDate": {
      "type": "string",
      "format": "date-time"
    },
    "IsDeleted": {
      "type": "boolean"
    },
    "Name": {
      "type": "string",
      "maxLength": 255
    },
    "Phone": {
      "type": "string",
      "maxLength": 40,
      "nullable": true
    },
    "Website": {
      "type": "string",
      "maxLength": 255,
      "nullable": true
    },
    "Description": {
      "type": "string",
      "maxLength": 32000,
      "nullable": true
    },
    "attributes": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "url"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "Account"
          ]
        },
        "url": {
          "type": "string"
        }
      }
    }
  }
}

ContactCreate

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "LastName"
  ],
  "properties": {
    "FirstName": {
      "type": "string",
      "maxLength": 40,
      "nullable": true
    },
    "LastName": {
      "type": "string",
      "maxLength": 80
    },
    "Email": {
      "type": "string",
      "format": "email",
      "nullable": true
    },
    "Phone": {
      "type": "string",
      "nullable": true
    },
    "Description": {
      "type": "string",
      "maxLength": 32000,
      "nullable": true
    },
    "AccountId": {
      "type": "string",
      "maxLength": 18,
      "nullable": true
    }
  }
}

ContactUpdate

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "FirstName": {
      "type": "string",
      "maxLength": 40,
      "nullable": true
    },
    "LastName": {
      "type": "string",
      "maxLength": 80
    },
    "Email": {
      "type": "string",
      "format": "email",
      "nullable": true
    },
    "Phone": {
      "type": "string",
      "nullable": true
    },
    "Description": {
      "type": "string",
      "maxLength": 32000,
      "nullable": true
    },
    "AccountId": {
      "type": "string",
      "maxLength": 18,
      "nullable": true
    }
  }
}

Contact

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "attributes"
  ],
  "properties": {
    "Id": {
      "type": "string",
      "maxLength": 18
    },
    "CreatedDate": {
      "type": "string",
      "format": "date-time"
    },
    "LastModifiedDate": {
      "type": "string",
      "format": "date-time"
    },
    "IsDeleted": {
      "type": "boolean"
    },
    "FirstName": {
      "type": "string",
      "maxLength": 40,
      "nullable": true
    },
    "LastName": {
      "type": "string",
      "maxLength": 80
    },
    "Name": {
      "type": "string",
      "maxLength": 203
    },
    "Email": {
      "type": "string",
      "format": "email",
      "nullable": true
    },
    "Phone": {
      "type": "string",
      "nullable": true
    },
    "Description": {
      "type": "string",
      "maxLength": 32000,
      "nullable": true
    },
    "AccountId": {
      "type": "string",
      "maxLength": 18,
      "nullable": true
    },
    "attributes": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "url"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "Contact"
          ]
        },
        "url": {
          "type": "string"
        }
      }
    }
  }
}

LeadCreate

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "LastName",
    "Company"
  ],
  "properties": {
    "FirstName": {
      "type": "string",
      "maxLength": 40,
      "nullable": true
    },
    "LastName": {
      "type": "string",
      "maxLength": 80
    },
    "Email": {
      "type": "string",
      "format": "email",
      "nullable": true
    },
    "Phone": {
      "type": "string",
      "nullable": true
    },
    "Description": {
      "type": "string",
      "maxLength": 32000,
      "nullable": true
    },
    "Company": {
      "type": "string"
    },
    "Website": {
      "type": "string",
      "nullable": true
    }
  }
}

LeadUpdate

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "FirstName": {
      "type": "string",
      "maxLength": 40,
      "nullable": true
    },
    "LastName": {
      "type": "string",
      "maxLength": 80
    },
    "Email": {
      "type": "string",
      "format": "email",
      "nullable": true
    },
    "Phone": {
      "type": "string",
      "nullable": true
    },
    "Description": {
      "type": "string",
      "maxLength": 32000,
      "nullable": true
    },
    "Company": {
      "type": "string"
    },
    "Website": {
      "type": "string",
      "nullable": true
    }
  }
}

Lead

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "attributes"
  ],
  "properties": {
    "Id": {
      "type": "string",
      "maxLength": 18
    },
    "CreatedDate": {
      "type": "string",
      "format": "date-time"
    },
    "LastModifiedDate": {
      "type": "string",
      "format": "date-time"
    },
    "IsDeleted": {
      "type": "boolean"
    },
    "FirstName": {
      "type": "string",
      "maxLength": 40,
      "nullable": true
    },
    "LastName": {
      "type": "string",
      "maxLength": 80
    },
    "Name": {
      "type": "string",
      "maxLength": 203
    },
    "Email": {
      "type": "string",
      "format": "email",
      "nullable": true
    },
    "Phone": {
      "type": "string",
      "nullable": true
    },
    "Description": {
      "type": "string",
      "maxLength": 32000,
      "nullable": true
    },
    "Company": {
      "type": "string"
    },
    "Website": {
      "type": "string",
      "nullable": true
    },
    "attributes": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "url"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "Lead"
          ]
        },
        "url": {
          "type": "string"
        }
      }
    }
  }
}

OpportunityCreate

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "Name",
    "StageName",
    "CloseDate"
  ],
  "properties": {
    "Name": {
      "type": "string",
      "maxLength": 120
    },
    "StageName": {
      "type": "string"
    },
    "CloseDate": {
      "type": "string",
      "format": "date"
    },
    "Amount": {
      "type": "number",
      "nullable": true
    },
    "AccountId": {
      "type": "string",
      "maxLength": 18,
      "nullable": true
    },
    "Description": {
      "type": "string",
      "maxLength": 32000,
      "nullable": true
    }
  }
}

OpportunityUpdate

{
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "Name": {
      "type": "string",
      "maxLength": 120
    },
    "StageName": {
      "type": "string"
    },
    "CloseDate": {
      "type": "string",
      "format": "date"
    },
    "Amount": {
      "type": "number",
      "nullable": true
    },
    "AccountId": {
      "type": "string",
      "maxLength": 18,
      "nullable": true
    },
    "Description": {
      "type": "string",
      "maxLength": 32000,
      "nullable": true
    }
  }
}

Opportunity

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "attributes"
  ],
  "properties": {
    "Id": {
      "type": "string",
      "maxLength": 18
    },
    "CreatedDate": {
      "type": "string",
      "format": "date-time"
    },
    "LastModifiedDate": {
      "type": "string",
      "format": "date-time"
    },
    "IsDeleted": {
      "type": "boolean"
    },
    "Name": {
      "type": "string",
      "maxLength": 120
    },
    "StageName": {
      "type": "string"
    },
    "CloseDate": {
      "type": "string",
      "format": "date"
    },
    "Amount": {
      "type": "number",
      "nullable": true
    },
    "AccountId": {
      "type": "string",
      "maxLength": 18,
      "nullable": true
    },
    "Description": {
      "type": "string",
      "maxLength": 32000,
      "nullable": true
    },
    "attributes": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "type",
        "url"
      ],
      "properties": {
        "type": {
          "type": "string",
          "enum": [
            "Opportunity"
          ]
        },
        "url": {
          "type": "string"
        }
      }
    }
  }
}

QueryResult

{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "totalSize",
    "done",
    "records"
  ],
  "properties": {
    "totalSize": {
      "type": "integer",
      "minimum": 0
    },
    "done": {
      "type": "boolean"
    },
    "nextRecordsUrl": {
      "type": "string"
    },
    "records": {
      "type": "array",
      "items": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/Account"
          },
          {
            "$ref": "#/components/schemas/Contact"
          },
          {
            "$ref": "#/components/schemas/Lead"
          },
          {
            "$ref": "#/components/schemas/Opportunity"
          }
        ]
      }
    }
  }
}

Document metadata and extensions

{
  "openapi": "3.0.3",
  "info": {
    "title": "Salesforce REST API — standard CRM object core",
    "version": "66.0",
    "description": "Bounded modeled API 66.0 core: 18 operations, four standard objects, selected published fields and an explicit SOQL grammar. Public reference-derived contract, not an org-generated schema. No custom fields, describe metadata, lead conversion, products, OAuth issuance, automation, sharing rules or arbitrary Salesforce org compatibility."
  }
}
Interactive API explorer (requires JavaScript)