POST Create a lead record. This operation can create leads that contain standard and custom fields.
POST /services/data/{apiVersion}/sobjects/lead
Operation ID: createLead.
The Body section lists all of the standard lead fields. Your org can contain different fields.
Parameters
Authorization(header, string, required) A unique, time-limited token that you can use to issue requests to REST API. ReplaceYOUR_ACCESS_TOKENwith your authentication token.Example
Bearer YOUR_ACCESS_TOKEN
Request body (required)
Media type: application/json. Schema: leadUpdateRequestBody.
Responses
- 201
This response indicates that the API accepted your request to create a lead.
Media type:
application/json. Schema:leadResponseBody.Example
{ "id": "003SB000002UaPtYAK", "success": true, "errors": [] } - 401
This response indicates that the API wasn’t able to authorize your request. When you receive a 401 response, verify that your authorization token is still valid.
Media type:
application/json. Schema:httpErrorResponseBody.Example
[ { "message": "Session expired or invalid", "errorCode": "INVALID_SESSION_ID" } ]