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.eyJzdWIiOjY1LCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzkyNjE5ODAyfQ.8G40lRE1BUzIso5ezv0_k3h0mGsPcGbfUUkwy2RUjmo
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/59
vary: Accept
etag: W/"a34f24cd6f0eb4e79f488d8e8c1bb728"
cache-control: max-age=0, private, must-revalidate
x-request-id: 64bc3dbb-42df-4fa0-ae67-4539b476b6d1
x-runtime: 0.012858
content-length: 369

Status

201 Created

Body

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