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.eyJzdWIiOjU5LCJhdWQiOlsiYWRtaW4iXSwiZXhwIjoxNzY3MzU4NTYyfQ.tppEd6M4kSUIhSPfSfUQNghTDWCKb8pDgqYB04GdJHE
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/53
vary: Accept
etag: W/"b77f1d2dd8336a282f168bd9f68facaf"
cache-control: max-age=0, private, must-revalidate
x-request-id: 0c6ceece-e847-4d77-af3c-ba3d647d49f3
x-runtime: 0.008370
content-length: 369

Status

201 Created

Body

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