Contacts API

create new entry

POST /api/rest/admin/contacts

Parameters

Name Description
data[type] Resource type (contacts)
data[attributes][email] Email
data[attributes][notes] Notes
data[relationships][contractor] Contractor

Request

Headers

Accept: application/vnd.api+json
Content-Type: application/vnd.api+json
Authorization: eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOjYyLCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzgxMjc5Mzk1fQ.miNbOd3CF2plEQV9-f_ea7F6GbOOwybW8jURBHQaJ0s
Host: example.org
Cookie: 

Route

POST /api/rest/admin/contacts

Body

{"data":{"type":"contacts","attributes":{"email":"some@mail.com","notes":"Text here..."}}}

Response

Headers

x-frame-options: SAMEORIGIN
x-xss-protection: 0
x-content-type-options: nosniff
x-permitted-cross-domain-policies: none
referrer-policy: strict-origin-when-cross-origin
content-type: application/vnd.api+json
location: http://example.org/api/rest/admin/contacts/56
vary: Accept
etag: W/"3520f7901777bfdd34ec9ea8f6580282"
cache-control: max-age=0, private, must-revalidate
x-request-id: 340a8eeb-aaaa-4e88-9030-dd9c92ad80e8
x-runtime: 0.008233
content-length: 369

Status

201 Created

Body

{
  "data": {
    "id": "56",
    "type": "contacts",
    "links": {
      "self": "http://example.org/api/rest/admin/contacts/56"
    },
    "attributes": {
      "email": "some@mail.com",
      "notes": "Text here..."
    },
    "relationships": {
      "contractor": {
        "links": {
          "self": "http://example.org/api/rest/admin/contacts/56/relationships/contractor",
          "related": "http://example.org/api/rest/admin/contacts/56/contractor"
        },
        "data": null
      }
    }
  }
}