I'm trying to create an EventRelation using the REST API, but it does not seem to be working. Here are the details of the request:
URI: /services/data/v37.0/sobjects/EventRelation/
With the following in the body of the request:
EventId: xxx (ID of the event I want to add a relation to)
RelationId: xxx (ID of a specific contact)
The API doesn't create the EventRelation and just returns the following:
{
"objectDescribe": {
"activateable": false,
"createable": true,
"custom": false,
"customSetting": false,
"deletable": true,
"deprecatedAndHidden": false,
"feedEnabled": false,
"keyPrefix": "0RE",
"label": "Event Relation",
"labelPlural": "Event Relations",
"layoutable": false,
"mergeable": false,
"mruEnabled": false,
"name": "EventRelation",
"queryable": true,
"replicateable": true,
"retrieveable": true,
"searchable": false,
"triggerable": false,
"undeletable": false,
"updateable": true,
"urls": {
"rowTemplate": "/services/data/v37.0/sobjects/EventRelation/{ID}",
"defaultValues": "/services/data/v37.0/sobjects/EventRelation/defaultValues?recordTypeId&fields",
"describe": "/services/data/v37.0/sobjects/EventRelation/describe",
"sobject": "/services/data/v37.0/sobjects/EventRelation"
}
},
"recentItems": [
]
}
Is there something I'm doing wrong? Am I not passing required fields? I simply just want to attach a lead or contact to an event.
POST
instead ofGET
?