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.eyJzdWIiOjYxLCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzcyMjEyMDAxfQ.UCNLytGKHYZozy6fS0pcKdDCGVgI_Tv_zvdd10_Q-LQ
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/55
vary: Accept
etag: W/"3aa0d5dd2b9be2f259ab8912633aad35"
cache-control: max-age=0, private, must-revalidate
x-request-id: 5f0c4878-18f6-4ad7-b23a-5205ea30058b
x-runtime: 0.009697
content-length: 369

Status

201 Created

Body

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